Fix scripts directory

main
Anthony 2025-07-30 00:37:12 +08:00
parent 32bd773fde
commit 7154d32ec8
1 changed files with 7 additions and 6 deletions

View File

@ -70,18 +70,19 @@ onInstall:
commands: |- commands: |-
# Create required directories and files # Create required directories and files
mkdir -p /home/jelastic/add-sftp-user-addon/logs/{operations,errors,debug} mkdir -p /home/jelastic/add-sftp-user-addon/logs/{operations,errors,debug}
mkdir -p /home/jelastic/add-sftp-user-addon/scripts
chmod -R 755 /home/jelastic/add-sftp-user-addon/logs chmod -R 755 /home/jelastic/add-sftp-user-addon/logs
touch /home/jelastic/add-sftp-user-addon/logs/script_output.log touch /home/jelastic/add-sftp-user-addon/logs/script_output.log
chmod 644 /home/jelastic/add-sftp-user-addon/logs/script_output.log chmod 644 /home/jelastic/add-sftp-user-addon/logs/script_output.log
# Download scripts # Download scripts (fail fast if any download fails)
wget https://deploy-proxy.mightybox.io/addons/add-sftp-user/raw/branch/main/add-sftp.sh -O /home/jelastic/add-sftp-user-addon/add-sftp.sh set -e
wget https://deploy-proxy.mightybox.io/addons/add-sftp-user/raw/branch/main/scripts/logging.sh -O /home/jelastic/add-sftp-user-addon/scripts/logging.sh wget -O /home/jelastic/add-sftp-user-addon/add-sftp.sh "https://deploy-proxy.mightybox.io/addons/add-sftp-user/raw/branch/main/add-sftp.sh"
wget https://deploy-proxy.mightybox.io/addons/add-sftp-user/raw/branch/main/scripts/system_prep.sh -O /home/jelastic/add-sftp-user-addon/scripts/system_prep.sh wget -O /home/jelastic/add-sftp-user-addon/scripts/logging.sh "https://deploy-proxy.mightybox.io/addons/add-sftp-user/raw/branch/main/scripts/logging.sh"
wget -O /home/jelastic/add-sftp-user-addon/scripts/system_prep.sh "https://deploy-proxy.mightybox.io/addons/add-sftp-user/raw/branch/main/scripts/system_prep.sh"
chmod +x /home/jelastic/add-sftp-user-addon/add-sftp.sh chmod +x /home/jelastic/add-sftp-user-addon/add-sftp.sh
chmod +x /home/jelastic/add-sftp-user-addon/scripts/logging.sh chmod +x /home/jelastic/add-sftp-user-addon/scripts/*.sh
chmod +x /home/jelastic/add-sftp-user-addon/scripts/system_prep.sh
# Source libraries and run the system preparation function # Source libraries and run the system preparation function
source /home/jelastic/add-sftp-user-addon/scripts/logging.sh source /home/jelastic/add-sftp-user-addon/scripts/logging.sh