Merge branch 'master' of waschsauger:git/dirty-helpers
commit
f7ab634d8b
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# suggest a random time for a cronjob
|
||||
|
||||
set -u
|
||||
set -e
|
||||
|
||||
hour=$((($RANDOM*24)/32768))
|
||||
minute=$((($RANDOM*60)/32768))
|
||||
dow="*"
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
if [ "$1" == "-w" ]; then
|
||||
dow=$((($RANDOM*7)/32768))
|
||||
fi
|
||||
fi
|
||||
|
||||
printf "%02i %02i * * %s\n" "$minute" "$hour" "$dow"
|
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
# sync gpg public keys between localhost and the specified hosts
|
||||
#
|
||||
# gpg-sync-keys host1 [host2 ...]
|
||||
#
|
||||
|
||||
#GPG="gpg -q --batch"
|
||||
GPG=gpg
|
||||
|
||||
hosts=$@
|
||||
|
||||
for host in $hosts; do
|
||||
echo "Importing from $host ..."
|
||||
ssh -C $host $GPG --export | $GPG --import
|
||||
done
|
||||
|
||||
#echo "Refreshing keys ..."
|
||||
#$GPG --refresh-keys
|
||||
|
||||
for host in $hosts; do
|
||||
echo "Exporting to $host ..."
|
||||
$GPG --export | ssh -C $host $GPG --import
|
||||
done
|
Loading…
Reference in New Issue