Files
initscripts/usr/lib/init/services/gitea.service
T
2025-07-25 16:26:16 +07:00

34 lines
646 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 gitea"
su gitea -c "/usr/bin/gitea -w /home/gitea" &> /var/log/gitea.log &
check $? "start gitea"
echo $(pgrep gitea) > /var/run/gitea.pid
return $?
}
stop() {
notify "Stopping gitea"
kill $(cat /var/run/gitea.pid | awk '{print $2}')
check $? "stop gitea"
rm /var/run/gitea.pid &> /dev/null
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
return 1
;;
esac
return $?