9 # Copy to /usr/local/etc/rc.d/backuppc and make execuatble
11 # Add the following line to /etc/rc.conf to enable BackupPC:
12 # backuppc_enable=(bool): Set to "NO" by default.
13 # Set it to "YES" to enable BackupPC.
17 # backuppc_enable="YES"
19 # It accepts : start, stop, restart, reload, status
21 # Provided by : Gabriel Rossetti
28 start_cmd="backuppc_start"
29 restart_cmd="backuppc_restart"
30 stop_cmd="backuppc_stop"
31 status_cmd="backuppc_status"
32 reload_cmd="backuppc_reload"
35 eval "${rcvar}=\${${rcvar}:-'NO'}"
37 : ${backuppc_enable="NO"}
38 #backuppc_enable=${backuppc_enable:-"NO"}
42 su backuppc -c '__INSTALLDIR__/bin/BackupPC -d'
43 echo "${name} started"
55 /usr/bin/pkill -f "__INSTALLDIR__/bin/BackupPC -d"
56 echo "${name} stopped"
61 if [ "`ps ax | grep "BackupPC -d" | grep perl`" = "" ] ; then
62 echo "${name} not running"
64 echo "${name} running"
70 /usr/bin/pkill -1 -f "__INSTALLDIR__/bin/BackupPC -d"
71 echo "${name} reloaded"
74 extra_commands="reload status"