gitea/scripts/start
David Kebler d2551161d2 watch script working now for realtime edits of UI and config
fixed bug where passed arguments  need to be saved for reuse further in script
2020-12-13 17:16:53 -08:00

14 lines
451 B
Bash
Executable file

#!/bin/bash
[[ ! $GITEA_DIR ]] && export GITEA_DIR=$(dirname $(cd $(dirname $(readlink -f $BASH_SOURCE));pwd -P))
PIDFILE="$GITEA_DIR/gitea.pid"
if [ -e ${PIDFILE} ]; then
read -r PID < $PIDFILE
if (ps -ea | grep $PID) &> /dev/null; then
echo "start aborted gitea is already running."
exit 1;
fi
fi
echo starting gitea detached sending log to $GITEA_LOG/gitea.log
$GITEA_DIR/scripts/run "$@" > $GITEA_DIR/gitea.log &
echo $! > $PIDFILE