summaryrefslogtreecommitdiff
path: root/system/pommed/rc.pommed
blob: 7bac4af53629b4d564ae454393b75545be440a5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh

# Start/stop/restart the pommed service:

pommed_start() {
  /usr/sbin/pommed
}

pommed_stop() {
  kill $(cat /var/run/pommed.pid) || killall pommed
  rm -f /var/run/pommed.pid
}

pommed_restart() {
  pommed_stop
  sleep 1
  pommed_start
}

case "$1" in
'start')
  pommed_start
  ;;
'stop')
  pommed_stop
  ;;
'restart')
  pommed_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac