diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 22449619..86cea88a 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1004,13 +1004,6 @@ LISTCERTS_NPM(){ } COPYCERTS_NPM(){ ssldir='/opt/nginx-proxy/ssl' - - olddirs=$(find $ssldir -type l ! -exec test -e {} \; -print) - for od in ${olddirs[@]}; do - echo "Removing old folder ... ${od}" - rm -f $od - done - if [ ! -z ${LOCAL_SERVICES+x} ]; then NCMD="ssh root@${LB_HOSTS[0]}" ${NCMD} rm -f /tmp/ssllist @@ -1020,19 +1013,33 @@ COPYCERTS_NPM(){ rm -f /tmp/ssllist for certdir in /opt/nginx-proxy/letsencrypt/live/*/ ; do echo $certdir; done > /tmp/ssllist fi + + if [ "${1}" = "reset" ]; then + echo "Resetting ... Deleting all SSL symlink folders" + for certdir in $(