updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / antivir-resident / avupd
blobc7bf3cd62b80a69d9647100496afe6ca119334f9
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 NOUPDATER=$(/usr/lib/AntiVir/avupdater status | grep 'not')
7 C_RUNNING="\033[1;32;40m"
9 case "$1" in
10 start)
11 stat_busy "Starting AntiVir Updater"
12 [ -n "$NOUPDATER" ] && /usr/lib/AntiVir/avupdater start &> /dev/null
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon avupd
17 stat_done
20 stop)
21 stat_busy "Stopping AntiVir Updater"
22 [ -z "$NOUPDATER" ] && /usr/lib/AntiVir/avupdater stop &> /dev/null
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm_daemon avupd
27 stat_done
30 status)
31 printf "${C_OTHER}:: ${C_MAIN}Probing AntiVir Updater... "
32 [ -z "$NOUPDATER" ] && printf "${C_RUNNING}" || printf "${C_FAIL}not "
33 printf "running${C_CLEAR}"
34 stat_done
36 restart)
37 $0 stop
38 sleep 1
39 $0 start
42 echo "usage: $0 {start|stop|status|restart}"
43 esac
44 exit 0