Skip to content

Instantly share code, notes, and snippets.

@ulinkwo
Created March 11, 2009 12:04
Show Gist options
  • Save ulinkwo/77433 to your computer and use it in GitHub Desktop.
Save ulinkwo/77433 to your computer and use it in GitHub Desktop.
The Subversion as Daemon Script
#!/bin/sh
#
# start/stop subversion daemon.
test -f /usr/bin/svnserve || exit 0
OPTIONS=”-d -r /svnroot”
case “$1″ in
start)
echo -n “Starting subversion daemon:”
echo -n ” svnserve”
start-stop-daemon –start –quiet –oknodo –user svnowner –exec /usr/bin/svnserve — $OPTIONS
echo “.”
;;
stop)
echo -n “Stopping subversion daemon:”
echo -n ” svnserve”
start-stop-daemon –stop –quiet –oknodo –exec /usr/bin/svnserve
echo “.”
;;
reload)
;;
force-reload)
$0 restart
;;
restart)
$0 stop
$0 start
;;
*)
echo “Usage: /etc/init.d/subversion {start|stop|reload|restart}”
exit 1
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment