From 6d0a15ed36267aadb114515ba6aaa85934374e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 16 Apr 2017 13:52:01 +0200 Subject: Add syncemail service --- service/syncemail | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 service/syncemail (limited to 'service/syncemail') 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)" +} -- cgit v1.2.3