From 53899434c68d124be7ffa34ae458c469e47a01d3 Mon Sep 17 00:00:00 2001 From: casjay Date: Sun, 11 Aug 2024 23:36:22 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/usr/local/etc/docker/init.d/08-gitea.sh --- rootfs/usr/local/etc/docker/init.d/08-gitea.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rootfs/usr/local/etc/docker/init.d/08-gitea.sh b/rootfs/usr/local/etc/docker/init.d/08-gitea.sh index 68c9574..38d9962 100755 --- a/rootfs/usr/local/etc/docker/init.d/08-gitea.sh +++ b/rootfs/usr/local/etc/docker/init.d/08-gitea.sh @@ -207,6 +207,7 @@ __run_pre_execute_checks() { __banner "$pre_execute_checks_MessageST" # Put command to execute in parentheses { + [ -d "$DATA_DIR/ssh" ] || mkdir -p "$DATA_DIR/ssh" [ -d "$CONF_DIR/custom" ] || mkdir -p "$CONF_DIR/custom" if [ -n "$CONF_DIR" ] && [ -f "$CONF_DIR/app.ini" ]; then sed -i "s|REPLACE_SQL_NAME|$GITEA_SQL_NAME|g" "$CONF_DIR/app.ini" @@ -251,7 +252,7 @@ __update_conf_files() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # custom commands - + __is_dir_empty "/config/ssh" && COPY_SSHD_CONF="yes" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # replace variables __replace "REPLACE_SSH_CONF_DIR" "/config/ssh" "/etc/ssh/sshd_config" @@ -261,8 +262,9 @@ __update_conf_files() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # define actions - [ -d " /config/ssh" ] || mkdir -p " /config/ssh" + [ -d " /config/ssh" ] || mkdir -p "/config/ssh" [ -d "$DATA_DIR/ssh" ] || mkdir -p "$DATA_DIR/ssh" + [ "$COPY_SSHD_CONF" = "yes" ] && Copy "/etc/ssh/sshd_config" "/config/ssh/" if [ ! -f /config/ssh/ssh_host_ed25519_key ]; then echo "Generating /config/ssh/ssh_host_ed25519_key..." ssh-keygen -t ed25519 -f /config/ssh/ssh_host_ed25519_key -N "" >/dev/null &&