Created
May 4, 2019 15:02
-
-
Save palopezv/78535ce9e56e13d268fa5d0069536492 to your computer and use it in GitHub Desktop.
svnserve systemd startup files as per https://stackoverflow.com/questions/38197727/how-to-start-svnserve-with-systemctl-systemd
This file contains hidden or 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
# /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" |
This file contains hidden or 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
[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 |
This file contains hidden or 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
# /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