49 |
} |
} |
50 |
|
|
51 |
case "$1" in |
case "$1" in |
52 |
start) |
start) |
53 |
get_login |
get_login |
54 |
echo -e ${COLOREDSTAR}"Starting ${GLOGIN} ..." |
echo -e ${COLOREDSTAR}"Starting ${GLOGIN} ..." |
55 |
/sbin/telinit a |
/sbin/telinit a |
56 |
evaluate_retval |
evaluate_retval |
57 |
|
|
58 |
update_svcstatus $1 |
update_svcstatus $1 |
59 |
splash svc_started "$(basename $0)" 0 |
splash svc_started "$(basename $0)" 0 |
60 |
;; |
;; |
61 |
stop) |
stop) |
62 |
get_login |
get_login |
63 |
if [ -n "$(ps -A|grep $(basename ${GLOGINCMD}))" ] |
if [ -n "$(ps -A|grep $(basename ${GLOGINCMD}))" ] |
64 |
then |
then |
65 |
echo -e ${COLOREDSTAR}"Stopping ${GLOGIN} ..." |
echo -e ${COLOREDSTAR}"Stopping ${GLOGIN} ..." |
|
#killproc ${GLOGINCMD} |
|
66 |
|
|
67 |
CUR_VT=$(fgconsole) |
CUR_VT=$(fgconsole) |
68 |
start-stop-daemon --stop --quiet --exe ${GLOGINCMD} |
start-stop-daemon --stop --quiet --exe ${GLOGINCMD} |
73 |
splash svc_started "$(basename $0)" 0 |
splash svc_started "$(basename $0)" 0 |
74 |
;; |
;; |
75 |
|
|
76 |
restart) |
restart) |
77 |
$0 stop |
$0 stop |
78 |
sleep 1 |
sleep 1 |
79 |
$0 start |
$0 start |
80 |
;; |
;; |
81 |
status) |
status) |
82 |
get_login |
get_login |
83 |
statusproc ${GLOGINCMD} |
statusproc ${GLOGINCMD} |
84 |
;; |
;; |
85 |
*) |
*) |
86 |
echo "Usage: $0 {start|stop|restart|status}" |
echo "Usage: $0 {start|stop|restart|status}" |
87 |
exit 1 |
exit 1 |
88 |
;; |
;; |
89 |
esac |
esac |