To receive notifications about scheduled maintenance, please subscribe to the mailing-list You can subscribe to the mailing-list at

Commit e6f2dc1a authored by Axel Beckert's avatar Axel Beckert

Remove remote script from remote host if unmodified

parent d5dcb140
......@@ -20,6 +20,6 @@ fi
hash=$(sha256sum | awk '{print $1}')
for host in $hosts; do
scp -qp root@$host:/tmp/
ssh root@$host '[ $(sha256sum /tmp/ | awk '\''{print $1}'\'') = '"$hash"' ] && perl /tmp/ '"$params"'; [ $(sha256sum /tmp/ | awk '\''{print $1}'\'') = '"$hash"' ] || echo $(hostname): WARNING: /tmp/ modified!'
ssh root@$host '[ $(sha256sum /tmp/ | awk '\''{print $1}'\'') = '"$hash"' ] && perl /tmp/ '"$params"'; if [ $(sha256sum /tmp/ | awk '\''{print $1}'\'') != '"$hash"' ]; then echo "$(hostname): WARNING: /tmp/ modified, not deleting"; else rm /tmp/; fi'
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment