gitea/scripts/systemd/start
David Kebler b4f1093b03 add themes and get_theme_list function and will add to ini file
moved fetch to library and called download
improved run commanad with set_env function
added upgrade script
added systemd scripts and refactored service file
added ini-gen function and separate call via ini-gen script
2020-12-13 13:24:31 -08:00

16 lines
512 B
Bash
Executable file

#!/bin/bash
ServiceName=gitea
Instance=$1
[[ ! $1 ]] && echo warning no instance supplied using default && Instance=default
Service=$ServiceName@$Instance
if systemctl is-active --quiet $Service; then
echo $Service is already running
else
echo starting $Service....
sudo systemctl daemon-reload
sudo systemctl start $Service
sleep 5
systemctl is-active --quiet $Service && \
echo $ServiceName $Instance is now running || \
(echo error: unable to start $Service; "$(dirname "$BASH_SOURCE")"/log $Instance 20;)
fi