16 lines
524 B
Bash
Executable file
16 lines
524 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-send -a $SERVICE -h "string:desktop-entry:org.kde.konsole" "We're already up and running" --icon=dialog-information
|
|
|
|
else
|
|
## notify user that syncthing is restarting
|
|
notify-send -a $SERVICE -h "string:desktop-entry:org.kde.konsole" "Starting up because power is back!" --icon=dialog-information
|
|
## start syncthing
|
|
/usr/bin/syncthing serve --no-browser --logfile=default
|
|
fi
|