Created
August 19, 2019 22:02
-
-
Save timoteoponce/a5afd085939c5e3becc59d2ecd7b3323 to your computer and use it in GitHub Desktop.
Fossil SCM service script for Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
WIKI_PATH=/opt/wiki | |
start() { | |
stop && cd $WIKI_PATH && /usr/bin/fossil serve --port 9090 --baseurl https://myhost.com/wiki; | |
} | |
stop() { | |
/usr/bin/killall fossil &> /dev/null || true ; | |
} | |
case "$1" in | |
start) start ;; | |
stop) stop ;; | |
restart) stop; start ;; | |
*) echo "usage: $0 start|stop|restart" >&2 | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment