Skip to content

Instantly share code, notes, and snippets.

@DrDoctor13
Created January 10, 2018 19:34
Show Gist options
  • Save DrDoctor13/42168677f5c2a39594f5ab438c25cdb2 to your computer and use it in GitHub Desktop.
Save DrDoctor13/42168677f5c2a39594f5ab438c25cdb2 to your computer and use it in GitHub Desktop.
Deluge peaceful kill service
==/usr/bin/delugepkill.sh==
#!/bin/bash
pkill -f deluge-gtk
exit
==/usr/lib/systemd/system/deluge-gtk-graceful-kill.service==
[Unit]
Description=kills deluge-gtk gracefully on shutdown
After=network.target
[Service]
Type=oneshot
ExecStart=/bin/true
ExecStop=/usr/bin/delugepkill.sh
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment