credentials

This commit is contained in:
qiaofeng1227 2023-09-20 14:44:46 +08:00
parent 0e3f8e7eea
commit 0f9590a6bd
3 changed files with 18 additions and 14 deletions

View file

@ -4,16 +4,9 @@ set -e
trap "sleep 1; continue" ERR
while ! docker cp my-container:/path/to/file websoft9-apphub:/websoft9/credentials; do
sleep 1
done
while ! docker cp my-container:/path/to/file websoft9-apphub:/path/to/credentials; do
sleep 1
done
while ! docker cp my-container:/path/to/file websoft9-apphub:/path/to/credentials; do
sleep 1
while true; do
docker cp websoft9-git:/var/websoft9/credential websoft9-apphub:/websoft9/credentials
docker cp websoft9-deployment:/var/websoft9/credential websoft9-apphub:/websoft9/credentials
docker cp websoft9-proxy:/var/websoft9/credential websoft9-apphub:/websoft9/credentials
sleep 3
done

View file

@ -0,0 +1,11 @@
#!/bin/bash
# Define PATH
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
# Export PATH
export PATH
export install_path="/data/websoft9"
cp $install_path/systemd/websoft9.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable websoft9.service
sudo systemctl start websoft9

View file

@ -5,8 +5,8 @@ After=network.target docker
[Service]
KillSignal=SIGQUIT
WorkingDirectory=/data/websoft9
ExecStart=bash send_credentials.sh
WorkingDirectory=/data/websoft9/systemd
ExecStart=-/bin/bash send_credentials.sh
Restart=always
Type=notify
NotifyAccess=all