added gitea.service
This commit is contained in:
@@ -2,3 +2,4 @@ root:x:0:root
|
|||||||
dnsmasq:x:963:dnsmasq
|
dnsmasq:x:963:dnsmasq
|
||||||
sshd:x:33:sshd
|
sshd:x:33:sshd
|
||||||
nobody:x:65534:
|
nobody:x:65534:
|
||||||
|
gitea:x:1000:
|
||||||
@@ -2,3 +2,4 @@ root:x:0:0:root:/root:/bin/sh
|
|||||||
dnsmasq:x:963:963:dnsmasq daemon:/:/usr/bin/nologin
|
dnsmasq:x:963:963:dnsmasq daemon:/:/usr/bin/nologin
|
||||||
sshd:x:33:33:SSH daemon:/var/lib/sshd:/bin/sh
|
sshd:x:33:33:SSH daemon:/var/lib/sshd:/bin/sh
|
||||||
nobody:x:65534:65534:Kernel Oerflow User:/:/usr/bin/nologin
|
nobody:x:65534:65534:Kernel Oerflow User:/:/usr/bin/nologin
|
||||||
|
gitea:x:1000:1000:Gitea daemon user:/home/gitea:/bin/sh
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#--- import colors and init-funcs ---
|
||||||
|
. /usr/lib/init/colors.sh
|
||||||
|
. /usr/lib/init/init-funcs.sh
|
||||||
|
#------------------------------------
|
||||||
|
|
||||||
|
start() {
|
||||||
|
otify "Starting gitea"
|
||||||
|
su gitea -c "/usr/bin/gitea -w /home/gitea"
|
||||||
|
check $? "start gitea"
|
||||||
|
echo $(pgrep gitea) > /var/run/gitea.pid
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
notify "Stopping gitea"
|
||||||
|
kill $(cat /var/run/gitea.pid)
|
||||||
|
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 $?
|
||||||
Reference in New Issue
Block a user