added telnet and reboot control, openrouterinit script

This commit is contained in:
wt committed 2024-06-26 15:59:10 +07:00
1 parent 0937112f04
commit 5279a9a6a6
23 files changed
+839 -26

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
#!/bin/sh
Green='\033[0;32m'
Color_Off='\033[0m'
Red='\033[0;31m'
case "$1" in
start)
printf "Starting openrouter software "
cd /srv/ftpd/auth_service_router/bin && ./auth_service &> /dev/null &
cd /srv/ftpd/openrouter_adminpanel/bin && ./openrouter &> /dev/null &
if [[ "$?" == "0" ]]; then
printf "[$Green OK $Color_Off]\n"
else
printf "[$Red ERR $Cpolor_Off]\n"
fi
;;
stop)
printf "Stopping openrouter software "
killall openrouter
killall auth_service
if [[ "$?" == "0" ]]; then
printf "[$Green OK $Color_Off]\n"
else
printf "[$Red ERR $Color_Off]\n"
fi
;;
restart|reload)
"$0" stop
"$0" start
;;
*)
echo "httpd init script usage: $0 {start|stop|restart}"
return 1
esac
return $?