added gitea.service

This commit is contained in:
wt
2024-12-12 17:49:27 +07:00
parent 28d377cb36
commit e7aa54763f
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -6,8 +6,8 @@
#------------------------------------
start() {
otify "Starting gitea"
su gitea -c "/usr/bin/gitea -w /home/gitea" &
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 $?
@@ -15,7 +15,7 @@ start() {
stop() {
notify "Stopping gitea"
kill $(cat /var/run/gitea.pid)
kill $(cat /var/run/gitea.pid | awk '{print $2}')
check $? "stop gitea"
rm /var/run/gitea.pid &> /dev/null
return $?