You are not logged in.
Hi,
I am trying to setup a systemd service to run a backup script of mine on shutdown. This is what I am using:
[Unit]
Description=My Shutdown (Backup) System
ConditionFileIsExecutable=/home/campbell/LinuxApps/bin/daily_backup.sh
DefaultDependencies=no
After=multi-user.target
Before=shutdown.target reboot.target halt.target
[Service]
Type=oneshot
ExecStart=/bin/bash -c /home/campbell/LinuxApps/bin/daily_backup.sh
StandardInput=tty
RemainAfterExit=yes
[Install]
WantedBy=shutdown.targetIt hasn't been running and I looked in journalctl and despite many shutdowns (not restarts) it has not been running. I checked shutdown.target and my system says it has only been run once in the last three days (I assume when I hit the shutdown button). I am using Gnome and GDM, do they use a non-systemd method of shutting down?
Thanks
Offline