many refinements
This commit is contained in:
@ -85,7 +85,7 @@ while true; do
|
||||
echo "Skipping $DISK, not SATA SSD or NVMe"
|
||||
fi
|
||||
done
|
||||
# wait 15 seconds, loop again
|
||||
echo "Sleeping 15 seconds so you can read this"
|
||||
sleep 15
|
||||
# wait {{ sleep_time }} seconds, loop again
|
||||
echo "Sleeping {{ sleep_time }} seconds"
|
||||
sleep {{ sleep_time }}
|
||||
done
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
|
||||
[Unit]
|
||||
Description={{ service_name }}
|
||||
git remote add origin git@gitea.matt-cloud.com:matt/ssd_health.gitAPI
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Group=root
|
||||
WorkingDirectory={{ service_folder }}
|
||||
ExecStartPre=/bin/sleep 5
|
||||
ExecStart={{ service_folder }}/venv/bin/python {{ service_folder }}/app.py
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
15
templates/service_template.service
Normal file
15
templates/service_template.service
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
[Unit]
|
||||
Description={{ service_name }}
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Group=root
|
||||
WorkingDirectory={{ service_working_folder }}
|
||||
ExecStartPre=/bin/sleep 5
|
||||
ExecStart={{ service_exe }}
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user