feat: add systemd unit/timer files
This commit is contained in:
parent
08e2b62a9a
commit
7741523087
13
misc/systemd/sentry-backup.service
Normal file
13
misc/systemd/sentry-backup.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Sentry backup
|
||||
After=docker.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
WorkingDirectory=/mnt/data/backup
|
||||
ExecStartPre=/bin/sh -c 'systemctl -q is-active sentry.service && systemctl stop sentry'
|
||||
ExecStart=/opt/sentry-util/sentry-util.sh backup
|
||||
ExecStartPost=/bin/sh -c 'systemctl start sentry'
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
8
misc/systemd/sentry-backup.timer
Normal file
8
misc/systemd/sentry-backup.timer
Normal file
@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Timer for Sentry backup
|
||||
|
||||
[Timer]
|
||||
OnCalendar=Mon 6:00:00
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user