| 36 | | ssh -t root@$1.mayfirst.org "mv /etc/ssl/$1.mayfirst.org.crt{,.old} && mv /etc/ssl/$1.mayfirst.org.crt{.new,} && mv /etc/ssl/private/$1.mayfirst.org.pem{,.old} && mv /etc/ssl/private/$1.mayfirst.org.pem{.new,} && [[ -a /etc/ssl/private/$1.mayfirst.org.key ]] && mv /etc/ssl/private/$1.mayfirst.org.key{,.old} || echo 'No old key to move' && mv /etc/ssl/private/$1.mayfirst.org.safe.key /etc/ssl/private/$1.mayfirst.org.key && /usr/local/sbin/freepuppet-run" |
| | 39 | # ssh -t root@$1.mayfirst.org "mv /etc/ssl/$1.mayfirst.org.crt{,.old} && mv /etc/ssl/$1.mayfirst.org.crt{.new,} && mv /etc/ssl/private/$1.mayfirst.org.pem{,.old} && mv /etc/ssl/private/$1.mayfirst.org.pem{.new,} && [[ -a /etc/ssl/private/$1.mayfirst.org.key ]] && mv /etc/ssl/private/$1.mayfirst.org.key{,.old} || echo 'No old key to move' && mv /etc/ssl/private/$1.mayfirst.org.safe.key /etc/ssl/private/$1.mayfirst.org.key && /usr/local/sbin/freepuppet-run" |
| | 40 | |
| | 41 | # a variation on the line above, which attempts to cope with missing files |
| | 42 | ssh -t root@$1.mayfirst.org "(test ! -f /etc/ssl/$1.mayfirst.org.crt || \ |
| | 43 | mv -v /etc/ssl/$1.mayfirst.org.crt{,.old}) && \ |
| | 44 | mv -v /etc/ssl/$1.mayfirst.org.crt{.new,} && \ |
| | 45 | (test ! -f /etc/ssl/private/$1.mayfirst.org.pem || \ |
| | 46 | mv -v /etc/ssl/private/$1.mayfirst.org.pem{,.old}) && \ |
| | 47 | mv -v /etc/ssl/private/$1.mayfirst.org.pem{.new,} && \ |
| | 48 | (test ! -f /etc/ssl/private/$1.mayfirst.org.key || \ |
| | 49 | mv -v /etc/ssl/private/$1.mayfirst.org.key{,.old}) && \ |
| | 50 | mv -v /etc/ssl/private/$1.mayfirst.org.safe.key \ |
| | 51 | /etc/ssl/private/$1.mayfirst.org.key && \ |
| | 52 | /usr/local/sbin/freepuppet-run" |
| | 53 | |