You are not logged in.

#1 2013-05-20 18:44:39

cecure
Member
Registered: 2013-04-09
Posts: 25

Does Gnome not use shutdown.target?

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.target

It 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

Board footer

Powered by FluxBB