Skip to content

Instantly share code, notes, and snippets.

@palopezv
Created May 4, 2019 15:02
Show Gist options
  • Save palopezv/78535ce9e56e13d268fa5d0069536492 to your computer and use it in GitHub Desktop.
Save palopezv/78535ce9e56e13d268fa5d0069536492 to your computer and use it in GitHub Desktop.
# /etc/default/svnserve
# svnserve options
DAEMON_ARGS="--daemon --pid-file /run/svnserve/svnserve.pid --root /srv/svn/repos --log-file /var/log/svnserve/svnserve.log"
[Unit]
Description=Subversion protocol daemon
After=syslog.target network.target
[Service]
Type=forking
RuntimeDirectory=svnserve
PIDFile=/run/svnserve/svnserve.pid
EnvironmentFile=/etc/default/svnserve
ExecStart=/usr/bin/svnserve $DAEMON_ARGS
User=svn
Group=svn
KillMode=control-group
Restart=on-failure
[Install]
WantedBy=multi-user.target
# /etc/logrotate.d/svnserve
# This applies to using syslog. If using systemd-journald, well...
/var/log/svnserve/*.log {
daily
missingok
rotate 14
compress
notifempty
create 640 svn adm
sharedscripts
postrotate
if /bin/systemctl status svnserve > /dev/null ; then \
/bin/systemctl restart svnserve > /dev/null; \
fi;
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment