finalize move and add report_mirror
This commit is contained in:
parent
c93e504c58
commit
6025e48049
|
@ -6,13 +6,13 @@
|
||||||
- [ ] debian-multimedia
|
- [ ] debian-multimedia
|
||||||
- [ ] debian-backports
|
- [ ] debian-backports
|
||||||
- [ ] debian-security
|
- [ ] debian-security
|
||||||
- [ ] ubuntu-releases (1 sec sync)
|
- [x] ubuntu-releases
|
||||||
- [ ] xubuntu-releases (1 sec sync)
|
- [x] xubuntu-releases
|
||||||
- [ ] puppylinux (broken)
|
- [ ] puppylinux (broken)
|
||||||
- [ ] CPAN (unstable)
|
- [ ] CPAN (unstable)
|
||||||
- [ ] CRAN
|
- [ ] CRAN
|
||||||
- [x] CTAN
|
- [x] CTAN
|
||||||
- [ ] fedora-epel
|
- [ ] fedora-epel <
|
||||||
- [x] cygwin
|
- [x] cygwin
|
||||||
- [x] gnu
|
- [x] gnu
|
||||||
- [x] nongnu
|
- [x] nongnu
|
||||||
|
@ -24,40 +24,40 @@
|
||||||
- [x] kernel.org-software
|
- [x] kernel.org-software
|
||||||
- [x] apache
|
- [x] apache
|
||||||
- [ ] eclipse (unstable)
|
- [ ] eclipse (unstable)
|
||||||
- [ ] kde <
|
- [x] kde
|
||||||
- [ ] kde-appplicationdata <
|
- [x] kde-applicationdata
|
||||||
- [ ] archlinux
|
- [ ] archlinux
|
||||||
- [ ] artixlinx <
|
- [x] artixlinx
|
||||||
- [ ] slackware <
|
- [x] slackware
|
||||||
- [ ] debian-cd
|
- [ ] debian-cd
|
||||||
- [ ] x.org <
|
- [x] x.org
|
||||||
- [ ] centos <
|
- [x] centos
|
||||||
- [ ] opensuse
|
- [ ] opensuse <
|
||||||
- [ ] FreeBSD <
|
- [x] FreeBSD
|
||||||
- [ ] fedora-enchilada
|
- [ ] fedora-enchilada <
|
||||||
- [ ] ubuntu-ports-releases <
|
- [x] ubuntu-ports-releases
|
||||||
- [ ] gentoo-distfiles
|
- [ ] gentoo-distfiles
|
||||||
- [ ] gentoo-portage <
|
- [x] gentoo-portage
|
||||||
- [ ] gutenberg <
|
- [ ] gutenberg (broken)
|
||||||
- [ ] racket-installers
|
- [ ] racket-installers
|
||||||
- [ ] plt-bundles <
|
- [ ] plt-bundles (broken)
|
||||||
- [ ] xiph <
|
- [x] xiph
|
||||||
- [ ] netbsd <
|
- [ ] netbsd (broken)
|
||||||
- [ ] macports-release <
|
- [x] macports-release
|
||||||
- [ ] macports-distfiles <
|
- [x] macports-distfiles
|
||||||
- [ ] sagemath <
|
- [x] sagemath
|
||||||
- [ ] vlc <
|
- [x] vlc
|
||||||
- [ ] tdf <
|
- [x] tdf
|
||||||
- [ ] saltstack
|
- [ ] saltstack
|
||||||
- [ ] alpine <
|
- [x] alpine
|
||||||
- [ ] raspbian <
|
- [ ] raspbian (high disk usage + long runtime + failing)
|
||||||
- [ ] raspberrypi
|
- [ ] raspberrypi
|
||||||
- [ ] ipfire (broken)
|
- [ ] ipfire (broken)
|
||||||
- [ ] manjaro <
|
- [x] manjaro
|
||||||
- [ ] mxlinux <
|
- [x] mxlinux
|
||||||
- [ ] mxlinux-iso <
|
- [x] mxlinux-iso
|
||||||
- [ ] parabola <
|
- [x] parabola
|
||||||
- [ ] trisquel-packages <
|
- [x] trisquel-packages
|
||||||
- [ ] trisquel-iso <
|
- [x] trisquel-iso
|
||||||
- [ ] almalinux <
|
- [x] almalinux
|
||||||
- [ ] ceph
|
- [ ] ceph
|
||||||
|
|
|
@ -16,7 +16,9 @@ Then configure `merlin-config.ini` and run using `./merlin`
|
||||||
- get the config or the rsync commond that a repo will sync with using a cli tool
|
- get the config or the rsync commond that a repo will sync with using a cli tool
|
||||||
- improve conversion from exit status enum to string
|
- improve conversion from exit status enum to string
|
||||||
- sort `arthur status` by last time synced
|
- sort `arthur status` by last time synced
|
||||||
- time spent to sync during last sync, seconds/minutes/hours until next sync
|
- last sync runtime, time until next sync
|
||||||
|
- when sync fails, then make a copy of the rsync logs
|
||||||
|
- create `csc-sync-fedora` rather than using the `report_mirror` setting
|
||||||
|
|
||||||
### Completed
|
### Completed
|
||||||
- [x] add bwlimit option for each rsync process
|
- [x] add bwlimit option for each rsync process
|
||||||
|
|
|
@ -132,6 +132,8 @@ type Repo struct {
|
||||||
RsyncLogFile string `ini:"-"`
|
RsyncLogFile string `ini:"-"`
|
||||||
// full file path for file logging this repo's zfssync
|
// full file path for file logging this repo's zfssync
|
||||||
ZfssyncLogFile string `ini:"-"`
|
ZfssyncLogFile string `ini:"-"`
|
||||||
|
// determines if report_mirror should be run after the sync (default: false)
|
||||||
|
ReportMirror bool `ini:"report_mirror"`
|
||||||
// add the "-vv" flag to rsync commands and enable the Debug log (default: false)
|
// add the "-vv" flag to rsync commands and enable the Debug log (default: false)
|
||||||
Verbose bool `ini:"verbose"`
|
Verbose bool `ini:"verbose"`
|
||||||
// the repo will write its name and status in a Result struct to DoneChan
|
// the repo will write its name and status in a Result struct to DoneChan
|
||||||
|
@ -232,6 +234,7 @@ func LoadConfig(configPath string, doneChan chan SyncResult, stopChan chan struc
|
||||||
RepoLogFile: filepath.Join(newConf.RepoLogDir, repoName) + ".log",
|
RepoLogFile: filepath.Join(newConf.RepoLogDir, repoName) + ".log",
|
||||||
RsyncLogFile: filepath.Join(newConf.RsyncLogDir, repoName) + "-rsync.log",
|
RsyncLogFile: filepath.Join(newConf.RsyncLogDir, repoName) + "-rsync.log",
|
||||||
ZfssyncLogFile: filepath.Join(newConf.ZfssyncLogDir, repoName) + "-zfssync.log",
|
ZfssyncLogFile: filepath.Join(newConf.ZfssyncLogDir, repoName) + "-zfssync.log",
|
||||||
|
ReportMirror: false,
|
||||||
Verbose: false,
|
Verbose: false,
|
||||||
DoneChan: doneChan,
|
DoneChan: doneChan,
|
||||||
StopChan: stopChan,
|
StopChan: stopChan,
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
ipv4_address = 129.97.134.71
|
||||||
|
ipv6_address = 2620:101:f000:4901:c5c::f:1055
|
||||||
|
|
||||||
|
; max_jobs = 6
|
||||||
|
|
||||||
|
download_dir = /mirror/root
|
||||||
|
trace_dir = /home/mirror-go/merlin/trace
|
||||||
|
state_dir = /home/mirror-go/merlin/state
|
||||||
|
|
||||||
|
repo_log_dir = /home/mirror-go/merlin/log
|
||||||
|
rsync_log_dir = /home/mirror-go/merlin/log-rsync
|
||||||
|
zfssync_log_dir = /home/mirror-go/merlin/log-zfssync
|
||||||
|
|
||||||
|
sock_path = /mirror/merlin/run/merlin-go.sock
|
||||||
|
|
||||||
|
[ubuntu]
|
||||||
|
dry_run = true
|
||||||
|
sync_type = csc-sync-standard
|
||||||
|
frequency = five-minutely
|
||||||
|
local_dir = ubuntu
|
||||||
|
rsync_host = rsync.releases.ubuntu.com
|
||||||
|
rsync_dir = releases
|
||||||
|
rsync_exclude = distribution/.timestamp_invisiable, .ignore_me
|
||||||
|
|
||||||
|
; add to the repo struct
|
||||||
|
; RsyncExclude []string `ini:"rsync_exclude"`
|
||||||
|
|
||||||
|
; then iterate over RsyncExclude:
|
||||||
|
; for _, exclude := range repo.RsyncExclude {}
|
|
@ -14,7 +14,6 @@ zfssync_log_dir = /home/mirror-go/merlin/log-zfssync
|
||||||
sock_path = /mirror/merlin/run/merlin-go.sock
|
sock_path = /mirror/merlin/run/merlin-go.sock
|
||||||
|
|
||||||
[ubuntu-releases]
|
[ubuntu-releases]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = bi-hourly
|
frequency = bi-hourly
|
||||||
local_dir = ubuntu-releases
|
local_dir = ubuntu-releases
|
||||||
|
@ -22,7 +21,6 @@ rsync_host = rsync.releases.ubuntu.com
|
||||||
rsync_dir = releases
|
rsync_dir = releases
|
||||||
|
|
||||||
[xubuntu-releases]
|
[xubuntu-releases]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = bi-hourly
|
frequency = bi-hourly
|
||||||
local_dir = xubuntu-releases
|
local_dir = xubuntu-releases
|
||||||
|
@ -52,6 +50,16 @@ local_dir = CTAN
|
||||||
rsync_host = rsync.dante.ctan.org
|
rsync_host = rsync.dante.ctan.org
|
||||||
rsync_dir = CTAN
|
rsync_dir = CTAN
|
||||||
|
|
||||||
|
[fedora-epel]
|
||||||
|
dry_run = true
|
||||||
|
verbose = true
|
||||||
|
sync_type = csc-sync-standard
|
||||||
|
frequency = bi-hourly
|
||||||
|
local_dir = fedora/epel
|
||||||
|
rsync_host = mirrors.kernel.org
|
||||||
|
rsync_dir = fedora-epel
|
||||||
|
report_mirror = true
|
||||||
|
|
||||||
[cygwin]
|
[cygwin]
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
|
@ -133,7 +141,6 @@ rsync_host = download.eclipse.org
|
||||||
rsync_dir = eclipseMirror
|
rsync_dir = eclipseMirror
|
||||||
|
|
||||||
[kde]
|
[kde]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = kde
|
local_dir = kde
|
||||||
|
@ -141,7 +148,6 @@ rsync_host = rsync.kde.org
|
||||||
rsync_dir = kdeftp
|
rsync_dir = kdeftp
|
||||||
|
|
||||||
[kde-applicationdata]
|
[kde-applicationdata]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = kde-applicationdata
|
local_dir = kde-applicationdata
|
||||||
|
@ -149,7 +155,6 @@ rsync_host = rsync.kde.org
|
||||||
rsync_dir = applicationdata
|
rsync_dir = applicationdata
|
||||||
|
|
||||||
[artixlinux]
|
[artixlinux]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = bi-hourly
|
frequency = bi-hourly
|
||||||
local_dir = artixlinux
|
local_dir = artixlinux
|
||||||
|
@ -157,7 +162,6 @@ rsync_host = mirror1.artixlinux.org
|
||||||
rsync_dir = artix-linux
|
rsync_dir = artix-linux
|
||||||
|
|
||||||
[slackware]
|
[slackware]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = slackware
|
local_dir = slackware
|
||||||
|
@ -165,7 +169,6 @@ rsync_host = slackware.cs.utah.edu
|
||||||
rsync_dir = slackware
|
rsync_dir = slackware
|
||||||
|
|
||||||
[x.org]
|
[x.org]
|
||||||
verbose = true
|
|
||||||
; csc-sync-standard x.org xorg.freedesktop.org xorg-archive
|
; csc-sync-standard x.org xorg.freedesktop.org xorg-archive
|
||||||
; csc-sync-standard x.org mirror.us.leaseweb.net xorg
|
; csc-sync-standard x.org mirror.us.leaseweb.net xorg
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
|
@ -175,15 +178,24 @@ rsync_host = rsync.mirrorservice.org
|
||||||
rsync_dir = ftp.x.org/pub/
|
rsync_dir = ftp.x.org/pub/
|
||||||
|
|
||||||
[centos]
|
[centos]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = centos
|
local_dir = centos
|
||||||
rsync_host = us-msync.centos.org
|
rsync_host = us-msync.centos.org
|
||||||
rsync_dir = CentOS
|
rsync_dir = CentOS
|
||||||
|
|
||||||
[FreeBSD]
|
[opensuse]
|
||||||
|
dry_run = true
|
||||||
verbose = true
|
verbose = true
|
||||||
|
; unsure what this setting is supposed to do
|
||||||
|
; #"--exclude distribution/.timestamp_invisible"
|
||||||
|
sync_type = csc-sync-standard
|
||||||
|
frequency = bi-hourly
|
||||||
|
local_dir = opensuse
|
||||||
|
rsync_host = stage.opensuse.org
|
||||||
|
rsync_dir = opensuse-full/opensuse/
|
||||||
|
|
||||||
|
[FreeBSD]
|
||||||
; Has not updated since at least June 2018
|
; Has not updated since at least June 2018
|
||||||
; csc-sync-standard FreeBSD ftp10.us.freebsd.org FreeBSD
|
; csc-sync-standard FreeBSD ftp10.us.freebsd.org FreeBSD
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
|
@ -193,8 +205,18 @@ local_dir = FreeBSD
|
||||||
rsync_host = ftp2.uk.freebsd.org
|
rsync_host = ftp2.uk.freebsd.org
|
||||||
rsync_dir = ftp.freebsd.org/pub/FreeBSD/
|
rsync_dir = ftp.freebsd.org/pub/FreeBSD/
|
||||||
|
|
||||||
[ubuntu-ports-releases]
|
[fedora-enchilada]
|
||||||
|
dry_run = true
|
||||||
verbose = true
|
verbose = true
|
||||||
|
; csc-sync-standard fedora/linux mirrors.kernel.org fedora-enchilada/linux/ --ignore-errors && ~/bin/report_mirror >/dev/null
|
||||||
|
sync_type = csc-sync-standard
|
||||||
|
frequency = bi-hourly
|
||||||
|
local_dir = fedora/linux
|
||||||
|
rsync_host = mirrors.kernel.org
|
||||||
|
rsync_dir = fedora-enchilada/linux/
|
||||||
|
report_mirror = true
|
||||||
|
|
||||||
|
[ubuntu-ports-releases]
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = ubuntu-ports-releases
|
local_dir = ubuntu-ports-releases
|
||||||
|
@ -202,7 +224,6 @@ rsync_host = cdimage.ubuntu.com
|
||||||
rsync_dir = cdimage/releases/
|
rsync_dir = cdimage/releases/
|
||||||
|
|
||||||
[gentoo-portage]
|
[gentoo-portage]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-hourly
|
frequency = twice-hourly
|
||||||
local_dir = gentoo-portage
|
local_dir = gentoo-portage
|
||||||
|
@ -226,7 +247,6 @@ rsync_host = mirror.racket-lang.org
|
||||||
rsync_dir = plt-bundles
|
rsync_dir = plt-bundles
|
||||||
|
|
||||||
[xiph]
|
[xiph]
|
||||||
verbose = true
|
|
||||||
; csc-sync-standard xiph downloads.xiph.org xiph/releases
|
; csc-sync-standard xiph downloads.xiph.org xiph/releases
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
|
@ -244,7 +264,6 @@ rsync_host = rsync.netbsd.org
|
||||||
rsync_dir = NetBSD
|
rsync_dir = NetBSD
|
||||||
|
|
||||||
[macports-release]
|
[macports-release]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = bi-hourly
|
frequency = bi-hourly
|
||||||
local_dir = MacPorts/release
|
local_dir = MacPorts/release
|
||||||
|
@ -252,7 +271,6 @@ rsync_host = rsync.macports.org
|
||||||
rsync_dir = macports/release/
|
rsync_dir = macports/release/
|
||||||
|
|
||||||
[macports-distfiles]
|
[macports-distfiles]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = bi-hourly
|
frequency = bi-hourly
|
||||||
local_dir = MacPorts/mpdistfiles
|
local_dir = MacPorts/mpdistfiles
|
||||||
|
@ -260,7 +278,6 @@ rsync_host = rsync.macports.org
|
||||||
rsync_dir = macports/distfiles/
|
rsync_dir = macports/distfiles/
|
||||||
|
|
||||||
[sagemath]
|
[sagemath]
|
||||||
verbose = true
|
|
||||||
; csc-sync-standard sage mirror.clibre.uqam.ca sage
|
; csc-sync-standard sage mirror.clibre.uqam.ca sage
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
|
@ -269,7 +286,6 @@ rsync_host = rsync.sagemath.org
|
||||||
rsync_dir = sage
|
rsync_dir = sage
|
||||||
|
|
||||||
[vlc]
|
[vlc]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = vlc
|
local_dir = vlc
|
||||||
|
@ -277,7 +293,6 @@ rsync_host = rsync.videolan.org
|
||||||
rsync_dir = videolan-ftp
|
rsync_dir = videolan-ftp
|
||||||
|
|
||||||
[tdf]
|
[tdf]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = tdf
|
local_dir = tdf
|
||||||
|
@ -285,7 +300,6 @@ rsync_host = rsync.documentfoundation.org
|
||||||
rsync_dir = tdf-pub
|
rsync_dir = tdf-pub
|
||||||
|
|
||||||
[alpine]
|
[alpine]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = hourly
|
frequency = hourly
|
||||||
local_dir = alpine
|
local_dir = alpine
|
||||||
|
@ -309,7 +323,6 @@ rsync_host = rsync.ipfire.org
|
||||||
rsync_dir = full
|
rsync_dir = full
|
||||||
|
|
||||||
[manjaro]
|
[manjaro]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = hourly
|
frequency = hourly
|
||||||
local_dir = manjaro
|
local_dir = manjaro
|
||||||
|
@ -317,7 +330,6 @@ rsync_host = mirrorservice.org
|
||||||
rsync_dir = repo.manjaro.org/repos/
|
rsync_dir = repo.manjaro.org/repos/
|
||||||
|
|
||||||
[mxlinux]
|
[mxlinux]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = mxlinux
|
local_dir = mxlinux
|
||||||
|
@ -325,7 +337,6 @@ rsync_host = mirror.math.princeton.edu
|
||||||
rsync_dir = pub/mxlinux/
|
rsync_dir = pub/mxlinux/
|
||||||
|
|
||||||
[mxlinux-iso]
|
[mxlinux-iso]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = mxlinux-iso
|
local_dir = mxlinux-iso
|
||||||
|
@ -333,7 +344,6 @@ rsync_host = mirror.math.princeton.edu
|
||||||
rsync_dir = pub/mxlinux-iso/
|
rsync_dir = pub/mxlinux-iso/
|
||||||
|
|
||||||
[parabola]
|
[parabola]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = parabola
|
local_dir = parabola
|
||||||
|
@ -341,7 +351,6 @@ rsync_host = repo.parabola.nu:875
|
||||||
rsync_dir = repos/
|
rsync_dir = repos/
|
||||||
|
|
||||||
[trisquel-packages]
|
[trisquel-packages]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = trisquel/packages
|
local_dir = trisquel/packages
|
||||||
|
@ -349,7 +358,6 @@ rsync_host = rsync.trisquel.info
|
||||||
rsync_dir = trisquel.packages/
|
rsync_dir = trisquel.packages/
|
||||||
|
|
||||||
[trisquel-iso]
|
[trisquel-iso]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = twice-daily
|
frequency = twice-daily
|
||||||
local_dir = trisquel/iso
|
local_dir = trisquel/iso
|
||||||
|
@ -357,7 +365,6 @@ rsync_host = rsync.trisquel.info
|
||||||
rsync_dir = trisquel.iso/
|
rsync_dir = trisquel.iso/
|
||||||
|
|
||||||
[almalinux]
|
[almalinux]
|
||||||
verbose = true
|
|
||||||
sync_type = csc-sync-standard
|
sync_type = csc-sync-standard
|
||||||
frequency = bi-hourly
|
frequency = bi-hourly
|
||||||
local_dir = almalinux
|
local_dir = almalinux
|
||||||
|
|
|
@ -3,7 +3,7 @@ Description=Manages synchronization of mirrored projects
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/home/mirror-go/merlin/merlin /home/mirror-go/merlin/merlin-config.ini
|
ExecStart=/home/mirror-go/merlin/merlin --config=/home/mirror-go/merlin/merlin-config.ini
|
||||||
WorkingDirectory=/home/mirror-go/merlin
|
WorkingDirectory=/home/mirror-go/merlin
|
||||||
User=mirror
|
User=mirror
|
||||||
Group=mirror
|
Group=mirror
|
||||||
|
|
|
@ -50,5 +50,6 @@ func SyncCompleted(repo *config.Repo, exit int) {
|
||||||
|
|
||||||
if exit == config.SUCCESS {
|
if exit == config.SUCCESS {
|
||||||
go zfsSync(repo)
|
go zfsSync(repo)
|
||||||
|
go reportMirror(repo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,3 +146,15 @@ func zfsSync(repo *config.Repo) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func reportMirror(repo *config.Repo) {
|
||||||
|
if !repo.ReportMirror {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
repo.Logger.Debug("Running report_mirror")
|
||||||
|
err := exec.Command("/home/mirror/bin/report_mirror").Run()
|
||||||
|
if err != nil {
|
||||||
|
repo.Logger.Error(fmt.Errorf("Error running report_mirror: %w", err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue