I have a backup-script for my Linux Mint machine. I wanted to block shutdown, sleep or logout commands until the script is running.
systemd-inhibit --what=shutdown:sleep:idle:handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch tar -czf /media/fabian/hdd_extern/backup_fabian/home_$datum.tar.gz /home/fabian/*
So far so good. It works when i try to shutdown the machine via commandline, but when I press the shutdown button in the cinnamon gui the user logs off an the process gets terminated.
Has anyone an idea how to fix this? Thanks for your answers
