From afbfe4619b594b7f4aad37dd31639eb174bbb22e Mon Sep 17 00:00:00 2001 From: Gary Date: Fri, 23 Feb 2024 09:34:07 -0800 Subject: [PATCH] main: modify local_install.sh --- scripts/local_install.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/local_install.sh b/scripts/local_install.sh index c6ba61ddc..a07fc5cad 100644 --- a/scripts/local_install.sh +++ b/scripts/local_install.sh @@ -186,13 +186,13 @@ if [ -s /etc/docker/daemon.json.original-"$DATE" ]; then DIFF=$(diff <(jq --sort-keys . /etc/docker/daemon.json) <(jq --sort-keys . /etc/docker/daemon.json.original-"$DATE")) if [ "$DIFF" != "" ]; then echo "Docker configuration updated, restart docker daemon..." - sudo systemctl restart docker + systemctl restart docker else echo "Docker configuration is up to date." fi else echo "Docker configuration updated, restart docker daemon..." - sudo systemctl restart docker + systemctl restart docker fi echo -e "-------------" @@ -219,8 +219,8 @@ cp -r /home/lasthour/lasthourcloud/app/Livewire /data/coolify/ cp /home/lasthour/lasthourcloud/.coolify-logo /data/coolify/.coolify-logo cp /home/lasthour/lasthourcloud/tailwind.config.js /data/coolify/tailwind/ -sudo chown -R 9999:root /data/coolify -sudo chmod -R 700 /data/coolify +chown -R 9999:root /data/coolify +chmod -R 700 /data/coolify # Copy .env.example if .env does not exist if [ ! -f /data/coolify/source/.env ]; then @@ -248,25 +248,27 @@ fi # Generate an ssh key (ed25519) at /data/coolify/ssh/keys/id.root@host.docker.internal if [ ! -f /data/coolify/ssh/keys/id.root@host.docker.internal ]; then ssh-keygen -t ed25519 -a 100 -f /data/coolify/ssh/keys/id.root@host.docker.internal -q -N "" -C root@coolify - sudo chown 9999 /data/coolify/ssh/keys/id.root@host.docker.internal + chown 9999 /data/coolify/ssh/keys/id.root@host.docker.internal fi addSshKey() { - sudo cat /data/coolify/ssh/keys/id.root@host.docker.internal.pub >>~/.ssh/authorized_keys - sudo chmod 600 ~/.ssh/authorized_keys + cat /data/coolify/ssh/keys/id.root@host.docker.internal.pub >>~/.ssh/authorized_keys + chmod 600 ~/.ssh/authorized_keys } if [ ! -f ~/.ssh/authorized_keys ]; then - sudo mkdir -p ~/.ssh - sudo chmod 700 ~/.ssh - sudo touch ~/.ssh/authorized_keys + mkdir -p ~/.ssh + chmod 700 ~/.ssh + touch ~/.ssh/authorized_keys addSshKey fi if ! grep -qw "root@coolify" ~/.ssh/authorized_keys; then addSshKey fi +echo "Generated SSH access" +echo "Begin upgrade.sh" bash /data/coolify/source/upgrade.sh "${LATEST_VERSION:-latest}" echo -e "\nCongratulations! Your Coolify instance is ready to use.\n"