aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xservice/mpd5
-rwxr-xr-xservice/syncemail19
2 files changed, 19 insertions, 5 deletions
diff --git a/service/mpd b/service/mpd
index 4f0f467..f55722a 100755
--- a/service/mpd
+++ b/service/mpd
@@ -4,11 +4,6 @@
description="Music player daemon"
pidfile=".config/mpd/pid"
-MPD_PID=~/.config/mpd/pid
-if [ ! -e $MPD_PID ] || ! kill -0 $(cat $MPD_PID); then
- mpd ~/.config/mpd/mpd.conf
-fi
-
status() {
[ -f $pidfile ] || return 1
kill -0 "$(cat $pidfile)" || return 1
diff --git a/service/syncemail b/service/syncemail
new file mode 100755
index 0000000..7465676
--- /dev/null
+++ b/service/syncemail
@@ -0,0 +1,19 @@
+#!/home/cynerd/.local/sbin/user-service.sh
+# vim: ft=sh
+
+description="Mail synchronization tool"
+pidfile="/tmp/syncemail-$(id -u).pid"
+
+status() {
+ [ -f $pidfile ] || return 1
+ kill -0 "$(cat $pidfile)" || return 1
+}
+
+start() {
+ ~/.local/sbin/syncemail
+}
+
+stop() {
+ kill "$(cat $pidfile)"
+ wait "$(cat $pidfile)"
+}