13 lines
399 B
Bash
Executable file
13 lines
399 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
## This script assumes you are running KDE
|
|
|
|
SERVICE="syncthing"
|
|
if pgrep -x "$SERVICE" >/dev/null
|
|
then
|
|
## notify user that syncthing is stopping
|
|
notify-send -a $SERVICE -h "string:desktop-entry:org.kde.konsole" "Terminating to save power." "Restart manually if you need $SERVICE." --icon=dialog-information
|
|
## kill syncthing
|
|
syncthing cli operations shutdown
|
|
fi
|