summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2023-12-13 19:33:06 -0800
committerDan Fandrich <dan@coneharvesters.com>2024-02-03 17:55:09 -0800
commit068a3ef548b34c0d0abe50fc982616c279001bcd (patch)
treea206385be299b33c74b38179be6753817a070699
parent0227d4d3beee7c000d77c0c7c8aa1823f2372e4a (diff)
downloadmgatools-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-xmirror_mageia16
-rwxr-xr-xsign_torrents5
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