aboutsummaryrefslogtreecommitdiff
path: root/service/syncemail
blob: 1346ddf6746d5b2a81dcb3bc3a7e72d83870d245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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() {
	true
	#~/.local/sbin/syncemail
}

stop() {
	PID="$(cat $pidfile)"
	kill $PID 2>/dev/null
	while kill -0 $PID 2>/dev/null; do sleep 1; done
}