Initial Commit

This commit is contained in:
2026-04-19 21:51:37 +01:00
commit d251b82d3a
12 changed files with 6656 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
#!/bin/sh
#
# Gitea startup script for Slackware Linux
NAME=gitea
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/gitea/${NAME}.pid
PIDDIR=/var/run/gitea
CONFIG=/etc/gitea/app.ini
WORKPATH=/var/lib/gitea
CUSTOMPATH=/var/lib/gitea/custom
gitea_start() {
if [ ! -d $PIDDIR ]; then
mkdir -p $PIDDIR
chown $NAME:$NAME $PIDDIR
fi
if [ -s $PIDFILE ]; then
echo "Gitea appears to be already running?"
exit 1
fi
echo "Starting Gitea ..."
su $NAME -l -c "$DAEMON web -w $WORKPATH -C $CUSTOMPATH -c $CONFIG -P $PIDFILE > /dev/null 2>&1 &"
}
gitea_stop() {
if [ ! -s $PIDFILE ]; then
echo "$PIDFILE does not exist or is empty."
exit 1
fi
PID=$(cat $PIDFILE)
echo -n "Stopping Gitea ..."
kill -TERM $(cat $PIDFILE)
rm -f $PIDFILE
echo " done"
}
gitea_restart() {
gitea_stop
sleep 5
gitea_start
}
case "$1" in
start)
gitea_start
;;
stop)
gitea_stop
;;
restart)
gitea_restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac