diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2023-12-13 19:33:06 -0800 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2024-02-03 17:55:09 -0800 |
commit | 068a3ef548b34c0d0abe50fc982616c279001bcd (patch) | |
tree | a206385be299b33c74b38179be6753817a070699 | |
parent | 0227d4d3beee7c000d77c0c7c8aa1823f2372e4a (diff) | |
download | mgatools-068a3ef548b34c0d0abe50fc982616c279001bcd.tar mgatools-068a3ef548b34c0d0abe50fc982616c279001bcd.tar.gz mgatools-068a3ef548b34c0d0abe50fc982616c279001bcd.tar.bz2 mgatools-068a3ef548b34c0d0abe50fc982616c279001bcd.tar.xz mgatools-068a3ef548b34c0d0abe50fc982616c279001bcd.zip |
Add new scripts
These were being used on rabbit.
-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 |