修复脚本执行错误
Some checks failed
Compile / build (x64, windows-latest) (push) Failing after 38s
Compile / build (x64, ubuntu-latest) (push) Failing after 3m7s

This commit is contained in:
远野千束 2024-10-05 21:52:39 +08:00
parent 5834abcd33
commit c271378c71

View File

@ -79,21 +79,21 @@ echo "Creating the systemd service"
# shellcheck disable=SC2002 # shellcheck disable=SC2002
id=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) 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 #bash -c "cat <<EOF > /etc/systemd/system/server-status-client.service
[Unit] #[Unit]
Description=Server Status Client #Description=Server Status Client
After=network-online.target #After=network-online.target
#
[Service] #[Service]
Type=simple #Type=simple
ExecStart=$install_dir/server-status-client/venv/bin/python main.py $server $token $id run -n $hostname --labels $labels --location $location #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 #WorkingDirectory=$install_dir/server-status-client
Restart=on-failure #Restart=on-failure
RestartSec=10 #RestartSec=10
#
[Install] #[Install]
WantedBy=multi-user.target #WantedBy=multi-user.target
EOF" #EOF"
# enable and start the service # enable and start the service
systemctl enable server-status-client systemctl enable server-status-client