updated on Fri Jan 6 08:01:17 UTC 2012
[aur-mirror.git] / blinkd / blinkd.install
blob78c2af2d4429a82182df15081e520a9fed4d4d37
1 post_install() {
2 echo '#!/bin/bash
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 case "$1" in
8   start)
9     stat_busy "Starting blinkd"
10     /usr/sbin/blinkd &
11     if [ $? -gt 0 ]; then
12       stat_fail
13     else
14       
15       add_daemon blinkd
16       stat_done
17     fi
18     ;;
19   stop)
20     stat_busy "Stopping blinkd"
21     kill `pidof blinkd` &> /dev/null
22     if [ $? -gt 0 ]; then
23       stat_fail
24     else
25       rm_daemon blinkd
26       stat_done
27     fi
28     ;;
29   restart)
30     $0 stop
31     sleep 2
32     $0 start
33     ;;
34   *)
35     echo "usage: $0 {start|stop|restart}"  
36 esac
37 exit 0' > /etc/rc.d/blinkd
38 chmod +x /etc/rc.d/blinkd
40 post_upgrade() {
41   post_install
43 post_remove() {
44   echo 'removed'