diff options
-rwxr-xr-x | mirror_mageia | 16 | ||||
-rwxr-xr-x | sign_torrents | 5 |
2 files changed, 21 insertions, 0 deletions
diff --git a/mirror_mageia b/mirror_mageia new file mode 100755 index 0000000..6f9b3b6 --- /dev/null +++ b/mirror_mageia @@ -0,0 +1,16 @@ +#!/bin/sh + +remoteurl="rsync://rsync.mageia.org/mageia" +localdir="/distrib/mageia" +rsync_options="-avH --delete" +lockfile="/home/mirror/locks/mageia" + +if [ -f "$lockfile" ]; then + # show error message when run from command line + [ -t 1 ] && cat $lockfile + exit +fi +echo "sync in progress since $(date)" > "$lockfile" +/usr/bin/rsync $rsync_options "$remoteurl" "$localdir" +rm -f "$lockfile" + diff --git a/sign_torrents b/sign_torrents new file mode 100755 index 0000000..321dac2 --- /dev/null +++ b/sign_torrents @@ -0,0 +1,5 @@ +#!/bin/bash + +for chksum in *.torrent; do + gpg --homedir "/var/lib/releasekey/keys" --output "$chksum.gpg" --yes --detach-sig "$chksum" +done |