sentry-util/misc/systemd/sentry-backup.service

13 lines
340 B
SYSTEMD

[Unit]
Description=Sentry backup
After=docker.service
[Service]
Type=OneShot
WorkingDirectory=/opt/sentry-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