Skip to content

Commit

Permalink
Add devuan packages sync scripts
Browse files Browse the repository at this point in the history
They currently don't have a timestamp file
  • Loading branch information
ja5087 committed Jul 2, 2020
1 parent 164ae6a commit 6842f88
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 11 deletions.
3 changes: 3 additions & 0 deletions modules/ocf_mirrors/files/project/devuan/sync-archive
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh -eu
/usr/local/bin/rsync-no-vanished -e 'ssh -i /opt/mirrors/project/devuan/devuan_rsa' \
--delete -razX files.devuan.org::devuan /opt/mirrors/ftp/devuan-cd
47 changes: 36 additions & 11 deletions modules/ocf_mirrors/manifests/projects/devuan.pp
Original file line number Diff line number Diff line change
@@ -1,18 +1,43 @@
class ocf_mirrors::projects::devuan {
file {
default:
owner => mirrors,
group => mirrors;

'/opt/mirrors/project/devuan-cd':
ensure => directory,
source => 'puppet:///modules/ocf_mirrors/project/devuan-cd',
owner => mirrors,
group => mirrors,
mode => '0755',
recurse => true;
ensure => directory,
mode => '0755';

'/opt/mirrors/project/devuan-cd/sync-releases':
source => 'puppet:///modules/ocf_mirrors/project/devuan-cd/sync-archive',
mode => '0755';

'/opt/mirrors/project/devuan':
ensure => directory,
mode => '0755';

'/opt/mirrors/project/devuan/sync-releases':
source => 'puppet:///modules/ocf_mirrors/project/devuan/sync-archive',
mode => '0755';

# we are registered with the Devuan project and have an SSH key for the
# master upstream mirror
'/opt/mirrors/project/devuan/devuan_rsa':
source => 'puppet:///private/mirrors/devuan',
mode => '0600',
show_diff => false;
}

ocf_mirrors::timer { 'devuan-cd':
exec_start => '/opt/mirrors/project/devuan-cd/sync-archive',
hour => '0/6',
minute => '57',
require => File['/opt/mirrors/project/devuan-cd'];
ocf_mirrors::timer {
'devuan-cd':
exec_start => '/opt/mirrors/project/devuan-cd/sync-archive',
hour => '0/6',
minute => '57',
require => File['/opt/mirrors/project/devuan-cd'];

'devuan':
exec_start => '/opt/mirrors/project/devuan/sync-archive',
minute => '3/30', # at 3 and 33th minute
require => File['/opt/mirrors/project/devuan'];
}
}

0 comments on commit 6842f88

Please sign in to comment.