blob: d3a5659e16c13ac5719a5a5d106a70bc33829fc8 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
#!/bin/sh
#
# Copyright (c)2004, Nothing But Net Limited
# <chris.smith@nothingbutnet.co.nz>
#
######################################################################
# RELEASED AND PROVIDED TO YOU UNDER THE SAME LICENCE AS THE BOXBACKUP
# SUITE OF PROGRAMS. LICENCE MAY BE VIEWED HERE:
#
# http://www.boxbackup.org/license.html
######################################################################
#
# /etc/init.d/bbackupd
# and its symbolic link
# /(usr/)sbin/rcbbackupd
#
### BEGIN INIT INFO
# Provides: bbackupd
# Required-Start: $named $network $local_fs $syslog
# X-UnitedLinux-Should-Start: $time ypbind sendmail
# Required-Stop: $named $network $localfs $syslog
# X-UnitedLinux-Should-Stop: $time ypbind sendmail
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: BoxBackup client side daemon
# Description: Client daemon for the BoxBackup software
# that allows you to communicate with a bbstored server.
### END INIT INFO
# Check for missing binaries (stale symlinks should not happen)
BBACKUPD_BIN=@bindir_expanded@/bbackupd
if [ ! -x $BBACKUPD_BIN ] ; then
echo "$BBACKUPD_BIN not installed"
exit 5
fi
. /etc/rc.status
# Reset status of this service
rc_reset
case "$1" in
start)
echo -n "Starting bbackupd "
startproc $BBACKUPD_BIN
rc_status -v
;;
stop)
echo -n "Shutting down bbackupd "
killproc -TERM $BBACKUPD_BIN
rc_status -v
;;
try-restart|condrestart)
if test "$1" = "condrestart"; then
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
fi
$0 status
if test $? = 0; then
$0 restart
else
rc_reset # Not running is not a failure.
fi
rc_status
;;
restart)
$0 stop
$0 start
rc_status
;;
force-reload)
echo -n "Reload service bbackupd "
killproc -HUP $BBACKUPD_BIN
rc_status -v
;;
reload)
echo -n "Reload service bbackupd "
killproc -HUP $BBACKUPD_BIN
rc_status -v
;;
status)
echo -n "Checking for service bbackupd "
checkproc $BBACKUPD_BIN
rc_status -v
;;
probe)
test @sysconfdir_expanded@/box/bbackupd.conf \
-nt @localstatedir_expanded@/bbackupd.pid \
&& echo reload
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
exit 1
esac
rc_exit
|