Changes between Version 2 and Version 3 of support-team/update-ssl-certificate


Ignore:
Timestamp:
Apr 13, 2014, 6:35:23 PM (10 years ago)
Author:
Steve Revilak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • support-team/update-ssl-certificate

    v2 v3  
    1414    exit 1
    1515fi
     16
     17# if anything goes wrong, stop
     18set -e
    1619
    1720echo "Creating /etc/ssl/temp directory..."
     
    3437
    3538echo "Moving new files into place..."
    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
     42ssh -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
    3754
    3855# Use this line for brand new servers