chore: add systemd service for auto-update on LXC boot
Runs boot-update.sh before PM2 starts to ensure the app is always up-to-date with main branch after container reboot. v1.22.0
This commit is contained in:
parent
0b68d275d0
commit
e3c9f56608
18
scripts/my-weekly-todo-update.service
Normal file
18
scripts/my-weekly-todo-update.service
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=My Weekly ToDo List - Boot Update (git pull + build)
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
Before=pm2-root.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/bin/bash /root/My-Weekly-ToDo-List/scripts/boot-update.sh
|
||||||
|
WorkingDirectory=/root/My-Weekly-ToDo-List
|
||||||
|
Environment=HOME=/root
|
||||||
|
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
StandardOutput=journal+console
|
||||||
|
StandardError=journal+console
|
||||||
|
TimeoutStartSec=300
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Loading…
Reference in New Issue
Block a user