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() { start() {
otify "Starting gitea" notify "Starting gitea"
su gitea -c "/usr/bin/gitea -w /home/gitea" & su gitea -c "/usr/bin/gitea -w /home/gitea" &> /var/log/gitea.log &
check $? "start gitea" check $? "start gitea"
echo $(pgrep gitea) > /var/run/gitea.pid echo $(pgrep gitea) > /var/run/gitea.pid
return $? return $?
@@ -15,7 +15,7 @@ start() {
stop() { stop() {
notify "Stopping gitea" notify "Stopping gitea"
kill $(cat /var/run/gitea.pid) kill $(cat /var/run/gitea.pid | awk '{print $2}')
check $? "stop gitea" check $? "stop gitea"
rm /var/run/gitea.pid &> /dev/null rm /var/run/gitea.pid &> /dev/null
return $? return $?
+1 -1
View File
@@ -6,7 +6,7 @@
#------------------------------------ #------------------------------------
start() { start() {
otify "Starting httpd" notify "Starting httpd"
/usr/bin/httpd -h /srv/www /usr/bin/httpd -h /srv/www
check $? "start httpd" check $? "start httpd"
echo $(pgrep httpd) > /var/run/httpd.pid echo $(pgrep httpd) > /var/run/httpd.pid