rc status added and init scripts fixed
This commit is contained in:
1 parent
9990e60387
commit
2e1b587226
8 files changed
+54
-4
No files matched your search
@@ -12,7 +12,7 @@ case "$1" in
|
||||
stop)
|
||||
notify "Stopping ftpd "
|
||||
kill $(cat /var/run/ftpd.pid)
|
||||
killall ftpd
|
||||
killall ftpd &> /dev/null
|
||||
rm /var/run/ftpd.pid
|
||||
check $?
|
||||
;;
|
||||
|
||||
@@ -7,9 +7,11 @@ case "$1" in
|
||||
notify "Starting hostapd "
|
||||
if [[ "$2" == "" ]]; then
|
||||
/usr/bin/hostapd -P /var/run/hostapd.pid /etc/hostapd/hostapd
|
||||
# echo $! > /var/run/hostapd.pid
|
||||
check $?
|
||||
else
|
||||
/usr/bin/hostapd -P /var/run/hostapd.pid $2
|
||||
# echo $! > /var/run/hostapd.pid
|
||||
check $?
|
||||
fi
|
||||
;;
|
||||
|
||||
@@ -6,13 +6,13 @@ case "$1" in
|
||||
start)
|
||||
notify "Starting httpd "
|
||||
httpd -h /srv/www &> /dev/null
|
||||
echo $! > /var/run/httpd.pid
|
||||
check $?
|
||||
;;
|
||||
stop)
|
||||
notify "Stopping httpd "
|
||||
killall httpd
|
||||
#kill $(cat /var/run/httpd.pid)
|
||||
#rm /var/run/httpd.pid
|
||||
rm /var/run/httpd.pid
|
||||
check $?
|
||||
;;
|
||||
restart|reload)
|
||||
|
||||
@@ -6,11 +6,13 @@ case "$1" in
|
||||
start)
|
||||
notify "Starting nginx "
|
||||
nginx
|
||||
echo $! > /var/run/nginx.pid
|
||||
check $?
|
||||
;;
|
||||
stop)
|
||||
notify "Stopping nginx "
|
||||
nginx -s stop
|
||||
rm /var/run/nginx.pid
|
||||
check $?
|
||||
;;
|
||||
restart|reload)
|
||||
|
||||
@@ -7,12 +7,14 @@ case "$1" in
|
||||
notify "Starting openrouter software "
|
||||
cd /srv/ftpd/auth_service_router/bin && ./auth_service &> /dev/null &
|
||||
cd /srv/ftpd/openrouter_adminpanel/bin && ./openrouter &> /dev/null &
|
||||
echo $! > /var/run/openrouterinit.pid
|
||||
check $?
|
||||
;;
|
||||
stop)
|
||||
notify "Stopping openrouter software "
|
||||
killall openrouter
|
||||
killall auth_service
|
||||
rm /var/run/openrouterinit.pid
|
||||
check $?
|
||||
;;
|
||||
restart|reload)
|
||||
|
||||
@@ -6,11 +6,13 @@ case "$1" in
|
||||
start)
|
||||
notify "Starting sshd "
|
||||
/usr/bin/sshd -D &
|
||||
echo $! > /var/run/ssh.pid
|
||||
check $?
|
||||
;;
|
||||
stop)
|
||||
notify "Stopping sshd "
|
||||
killall sshd
|
||||
rm /var/run/ssh.pid
|
||||
check $?
|
||||
;;
|
||||
restart|reload)
|
||||
|
||||
@@ -6,11 +6,13 @@ case "$1" in
|
||||
start)
|
||||
notify "Starting telnet "
|
||||
telnetd -S -p $(cat /etc/openrouter/telnet/port)
|
||||
echo $! > /var/run/telnet.pid
|
||||
check $?
|
||||
;;
|
||||
stop)
|
||||
notify "Stopping telnet "
|
||||
killall telnetd
|
||||
rm /var/run/telnet.pid
|
||||
check $?
|
||||
;;
|
||||
restart|reload)
|
||||
|
||||
Reference in new issue
Block a user