Skip to content

Instantly share code, notes, and snippets.

@timoteoponce
Created August 19, 2019 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timoteoponce/a5afd085939c5e3becc59d2ecd7b3323 to your computer and use it in GitHub Desktop.
Save timoteoponce/a5afd085939c5e3becc59d2ecd7b3323 to your computer and use it in GitHub Desktop.
Fossil SCM service script for Linux
#!/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