main: modify local_install.sh
This commit is contained in:
parent
fce392c7ed
commit
0a31199ecd
@ -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"))
|
DIFF=$(diff <(jq --sort-keys . /etc/docker/daemon.json) <(jq --sort-keys . /etc/docker/daemon.json.original-"$DATE"))
|
||||||
if [ "$DIFF" != "" ]; then
|
if [ "$DIFF" != "" ]; then
|
||||||
echo "Docker configuration updated, restart docker daemon..."
|
echo "Docker configuration updated, restart docker daemon..."
|
||||||
sudo systemctl restart docker
|
systemctl restart docker
|
||||||
else
|
else
|
||||||
echo "Docker configuration is up to date."
|
echo "Docker configuration is up to date."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Docker configuration updated, restart docker daemon..."
|
echo "Docker configuration updated, restart docker daemon..."
|
||||||
sudo systemctl restart docker
|
systemctl restart docker
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "-------------"
|
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/.coolify-logo /data/coolify/.coolify-logo
|
||||||
cp /home/lasthour/lasthourcloud/tailwind.config.js /data/coolify/tailwind/
|
cp /home/lasthour/lasthourcloud/tailwind.config.js /data/coolify/tailwind/
|
||||||
|
|
||||||
sudo chown -R 9999:root /data/coolify
|
chown -R 9999:root /data/coolify
|
||||||
sudo chmod -R 700 /data/coolify
|
chmod -R 700 /data/coolify
|
||||||
|
|
||||||
# Copy .env.example if .env does not exist
|
# Copy .env.example if .env does not exist
|
||||||
if [ ! -f /data/coolify/source/.env ]; then
|
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
|
# 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
|
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
|
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
|
fi
|
||||||
|
|
||||||
addSshKey() {
|
addSshKey() {
|
||||||
sudo cat /data/coolify/ssh/keys/id.root@host.docker.internal.pub >>~/.ssh/authorized_keys
|
cat /data/coolify/ssh/keys/id.root@host.docker.internal.pub >>~/.ssh/authorized_keys
|
||||||
sudo chmod 600 ~/.ssh/authorized_keys
|
chmod 600 ~/.ssh/authorized_keys
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -f ~/.ssh/authorized_keys ]; then
|
if [ ! -f ~/.ssh/authorized_keys ]; then
|
||||||
sudo mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
sudo chmod 700 ~/.ssh
|
chmod 700 ~/.ssh
|
||||||
sudo touch ~/.ssh/authorized_keys
|
touch ~/.ssh/authorized_keys
|
||||||
addSshKey
|
addSshKey
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -qw "root@coolify" ~/.ssh/authorized_keys; then
|
if ! grep -qw "root@coolify" ~/.ssh/authorized_keys; then
|
||||||
addSshKey
|
addSshKey
|
||||||
fi
|
fi
|
||||||
|
echo "Generated SSH access"
|
||||||
|
|
||||||
|
echo "Begin upgrade.sh"
|
||||||
bash /data/coolify/source/upgrade.sh "${LATEST_VERSION:-latest}"
|
bash /data/coolify/source/upgrade.sh "${LATEST_VERSION:-latest}"
|
||||||
|
|
||||||
echo -e "\nCongratulations! Your Coolify instance is ready to use.\n"
|
echo -e "\nCongratulations! Your Coolify instance is ready to use.\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user