mirror of
https://github.com/snowykami/server-status-client.git
synced 2024-11-21 22:57:59 +08:00
✨ 修复脚本执行错误
This commit is contained in:
parent
5834abcd33
commit
c271378c71
30
deploy.sh
30
deploy.sh
@ -79,21 +79,21 @@ echo "Creating the systemd service"
|
||||
# shellcheck disable=SC2002
|
||||
id=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
|
||||
bash -c "cat <<EOF > /etc/systemd/system/server-status-client.service
|
||||
[Unit]
|
||||
Description=Server Status Client
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=$install_dir/server-status-client/venv/bin/python main.py $server $token $id run -n $hostname --labels $labels --location $location
|
||||
WorkingDirectory=$install_dir/server-status-client
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF"
|
||||
#bash -c "cat <<EOF > /etc/systemd/system/server-status-client.service
|
||||
#[Unit]
|
||||
#Description=Server Status Client
|
||||
#After=network-online.target
|
||||
#
|
||||
#[Service]
|
||||
#Type=simple
|
||||
#ExecStart=$install_dir/server-status-client/venv/bin/python main.py $server $token $id run -n $hostname --labels $labels --location $location
|
||||
#WorkingDirectory=$install_dir/server-status-client
|
||||
#Restart=on-failure
|
||||
#RestartSec=10
|
||||
#
|
||||
#[Install]
|
||||
#WantedBy=multi-user.target
|
||||
#EOF"
|
||||
|
||||
# enable and start the service
|
||||
systemctl enable server-status-client
|
||||
|
Loading…
Reference in New Issue
Block a user