Files
initscripts/usr/lib/init/services/openrouterinit.service
T

39 lines
909 B
Desktop File
Executable File

#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
start() {
notify "Starting openrouter software"
/usr/bin/auth_service &>/dev/null &
check $? "start auth_service"
echo $! > /var/run/auth_service.pid
/usr/bin/openrouter &> /dev/null &
check $? "start openrouter"
echo $! > /var/run/openrouter.pid
echo "" > /var/run/openrouterinit.pid
return $?
}
stop() {
notify "Stopping openrouter software"
kill $(cat /var/run/auth_service.pid)
check $? "stop auth_service"
kill $(cat /var/run/openrouter.pid)
check $? "stop openrouter"
rm /var/run/auth_service.pid /var/run/openrouter.pid /var/run/openrouterinit.pid &> /dev/null
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
;;
esac
return $?