# HG changeset patch # User František Kučera # Date 1556119744 -7200 # Node ID 735961d9596eb6313e1924ce4dc1e02b6d928d58 # Parent 8cd5d49dfaa24f808eb2721c6b79658556fa87bc configuration diff -r 8cd5d49dfaa2 -r 735961d9596e etc/apache2/git.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/apache2/git.conf Wed Apr 24 17:29:04 2019 +0200 @@ -0,0 +1,23 @@ + + ServerName … + ServerAlias … + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html + + Alias /cgit-css "/usr/share/cgit/" + ScriptAlias / "/usr/lib/cgit/cgit.cgi/" + + AllowOverride None + Options None + Require all granted + + + AllowOverride None + Options ExecCGI FollowSymlinks + Require all granted + + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + diff -r 8cd5d49dfaa2 -r 735961d9596e etc/apache2/hg.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/apache2/hg.conf Wed Apr 24 17:29:04 2019 +0200 @@ -0,0 +1,13 @@ + + ServerName … + ServerAlias … + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html + + ProxyPass "/" "http://localhost:16169/" + ProxyPassReverse "/" "http://localhost:16169/" + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + diff -r 8cd5d49dfaa2 -r 735961d9596e etc/cgit/cgitrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/cgit/cgitrc Wed Apr 24 17:29:04 2019 +0200 @@ -0,0 +1,10 @@ +# +# cgit config +# see cgitrc(5) for details + +css=/cgit-css/cgit.css +logo=/cgit-css/cgit.png + +virtual-root=/ + +scan-path=/mnt/data/public/git/ diff -r 8cd5d49dfaa2 -r 735961d9596e etc/client.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/client.cfg Wed Apr 24 17:29:04 2019 +0200 @@ -0,0 +1,5 @@ +# VCS Backup +# Client-side configuration: + +VCS_BACKUP_SERVER="vcs-backup-manager@LOCALHOST"; +VCS_BACKUP_SSH_COMMAND=(ssh "$VCS_BACKUP_SERVER"); diff -r 8cd5d49dfaa2 -r 735961d9596e etc/mercurial/hg-serve.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/mercurial/hg-serve.cfg Wed Apr 24 17:29:04 2019 +0200 @@ -0,0 +1,4 @@ +[paths] +/ = /mnt/data/public/hg/* +[web] +style = gitweb diff -r 8cd5d49dfaa2 -r 735961d9596e etc/server.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/server.cfg Wed Apr 24 17:29:04 2019 +0200 @@ -0,0 +1,4 @@ +# VCS Backup +# Server-side configuration: + +# currently not needed, can be used to override variables from the script diff -r 8cd5d49dfaa2 -r 735961d9596e etc/systemd/vcs-backup-clone.service --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/systemd/vcs-backup-clone.service Wed Apr 24 17:29:04 2019 +0200 @@ -0,0 +1,10 @@ +[Unit] +Description = VCS Backup: clone +After = network.target + +[Service] +User=vcs-backup +ExecStart = /usr/local/bin/vcs-backup.sh serverStartCloneService + +[Install] +WantedBy = multi-user.target diff -r 8cd5d49dfaa2 -r 735961d9596e etc/systemd/vcs-backup-createSubvolume.service --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/systemd/vcs-backup-createSubvolume.service Wed Apr 24 17:29:04 2019 +0200 @@ -0,0 +1,9 @@ +[Unit] +Description = VCS Backup: createSubvolume +After = network.target + +[Service] +ExecStart = /usr/local/bin/vcs-backup.sh serverStartSubvolumeService + +[Install] +WantedBy = multi-user.target diff -r 8cd5d49dfaa2 -r 735961d9596e etc/systemd/vcs-backup-web-hg.service --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/systemd/vcs-backup-web-hg.service Wed Apr 24 17:29:04 2019 +0200 @@ -0,0 +1,11 @@ +[Unit] +Description = Mercurial +After = syslog.target network.target + +[Service] +User=vcs-backup +ExecStart = /usr/bin/hg serve --web-conf /mnt/data/etc/hg-serve.cfg --address 127.0.0.1 --port 16169 +SuccessExitStatus = 255 + +[Install] +WantedBy = multi-user.target diff -r 8cd5d49dfaa2 -r 735961d9596e systemd/vcs-backup-clone.service --- a/systemd/vcs-backup-clone.service Wed Apr 24 17:09:27 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -[Unit] -Description = VCS Backup: clone -After = network.target - -[Service] -User=vcs-backup -ExecStart = /usr/local/bin/vcs-backup.sh serverStartCloneService - -[Install] -WantedBy = multi-user.target diff -r 8cd5d49dfaa2 -r 735961d9596e systemd/vcs-backup-subvolume.service --- a/systemd/vcs-backup-subvolume.service Wed Apr 24 17:09:27 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -[Unit] -Description = VCS Backup: subvolume -After = network.target - -[Service] -ExecStart = /usr/local/bin/vcs-backup.sh serverStartSubvolumeService - -[Install] -WantedBy = multi-user.target diff -r 8cd5d49dfaa2 -r 735961d9596e systemd/vcs-backup-web-hg.service --- a/systemd/vcs-backup-web-hg.service Wed Apr 24 17:09:27 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -[Unit] -Description = Mercurial -After = syslog.target network.target - -[Service] -User=vcs-backup -ExecStart = /usr/bin/hg serve --web-conf /mnt/data/etc/hg-serve.cfg --address 127.0.0.1 --port 16169 -SuccessExitStatus = 255 - -[Install] -WantedBy = multi-user.target - - -# Configura in etc/hg-serve.cfg: -# [paths] -# / = /mnt/data/current/hg/* -# [web] -# style = gitweb diff -r 8cd5d49dfaa2 -r 735961d9596e vcs-backup.sh --- a/vcs-backup.sh Wed Apr 24 17:09:27 2019 +0200 +++ b/vcs-backup.sh Wed Apr 24 17:29:04 2019 +0200 @@ -17,7 +17,7 @@ # along with this program. If not, see . -# VCS Backup is a configuration for setting up a version control system mirrors. +# VCS Backup is a configuration for setting up VCS (version control system) mirrors. # Currently Mercurial (Hg) and Git are supported. # Features: # - mirrors remote repositories @@ -279,8 +279,8 @@ pullDuration=$(( $pullFinishedMiliseconds - $pullStartedMiliseconds )); fi + printRecfileKeyValue "type" "$vcsType"; printRecfileKeyValue "serverPath" "$absolutePath"; - printRecfileKeyValue "type" "$vcsType"; printRecfileKeyValue "state" "$state"; printRecfileKeyValue "started" "$pullStarted"; printRecfileKeyValue "finished" "$pullFinished";