1 |
#!/bin/bash |
#!/bin/bash |
2 |
# $Header: /root/magellan-cvs/src/remserial/remserial.rc,v 1.2 2008-02-22 11:45:42 niro Exp $ |
# $Id$ |
3 |
|
|
4 |
#%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k |
#%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k |
5 |
#%start: 90 |
#%start: 90 |
10 |
#%before: |
#%before: |
11 |
#%after: |
#%after: |
12 |
|
|
13 |
source /etc/sysconfig/rc |
source /etc/conf.d/rc |
14 |
source $rc_functions |
source $rc_functions |
15 |
source /etc/conf.d/remserial |
source /etc/conf.d/remserial |
16 |
|
|
20 |
do |
do |
21 |
if [[ -z $(eval echo \$${i}) ]] |
if [[ -z $(eval echo \$${i}) ]] |
22 |
then |
then |
23 |
echo "Please set up /etc/conf.d/remserial proberly... aborted" |
rc_echo "Please set up /etc/conf.d/remserial proberly... aborted" |
24 |
exit 1 |
exit 1 |
25 |
fi |
fi |
26 |
done |
done |
29 |
|
|
30 |
case "$1" in |
case "$1" in |
31 |
start) |
start) |
32 |
echo -e ${COLOREDSTAR}"Starting remote-serial daemon ..." |
rc_print "Starting remote-serial daemon ..." |
33 |
checkconfig |
checkconfig |
34 |
start-stop-daemon --quiet --start --exec /usr/bin/remserial \ |
start-stop-daemon --quiet --start --exec /usr/bin/remserial \ |
35 |
--pidfile /var/run/remserial.pid --make-pidfile --background \ |
--pidfile /var/run/remserial.pid --make-pidfile --background \ |
41 |
;; |
;; |
42 |
|
|
43 |
stop) |
stop) |
44 |
echo -e ${COLOREDSTAR}"Stopping remote-serial daemon ..." |
rc_print "Stopping remote-serial daemon ..." |
45 |
start-stop-daemon --quiet --stop --pidfile /var/run/remserial.pid |
start-stop-daemon --quiet --stop --pidfile /var/run/remserial.pid |
46 |
evaluate_retval |
evaluate_retval |
47 |
|
|
60 |
;; |
;; |
61 |
|
|
62 |
*) |
*) |
63 |
echo "Usage: $0 {start|stop|restart|status}" |
rc_echo "Usage: $0 {start|stop|restart|status}" |
64 |
exit 1 |
exit 1 |
65 |
;; |
;; |
66 |
esac |
esac |