fix addsubdomain linking old files

This commit is contained in:
fram3d 2024-01-22 17:44:58 +01:00
parent 3ee717e7d1
commit 2fef0f1c9f
Signed by: fram3d
GPG Key ID: 938920E709EEA32A

View File

@ -18,8 +18,10 @@ mv /etc/nginx/sites-available/subdomain.dmz.rs.https /etc/nginx/sites-available/
ln -s /etc/nginx/sites-available/"$SUBDOMAIN".dmz.rs.http /etc/nginx/sites-enabled/"$SUBDOMAIN".dmz.rs.http
service nginx reload
certbot certonly -d "$SUBDOMAIN".dmz.rs,"$SUBDOMAIN".decentrala.org --webroot -w /var/www/"$SUBNODOT"dmzrs
unlink /etc/nginx/sites-enabled/"$SUBDOMAIN".dmz.rs.http
cat /etc/nginx/sites-available/"$SUBDOMAIN".dmz.rs.http /etc/nginx/sites-available/"$SUBDOMAIN".dmz.rs.https > /etc/nginx/sites-available/"$SUBDOMAIN".dmz.rs.all
mv /etc/nginx/sites-available/"$SUBDOMAIN".dmz.rs.all /etc/nginx/sites-available/"$SUBDOMAIN".dmz.rs
ln -s /etc/nginx/sites-available/"$SUBDOMAIN".dmz.rs /etc/nginx/sites-enabled/"$SUBDOMAIN".dmz.rs
rm /etc/nginx/sites-available/"$SUBDOMAIN".dmz.rs.https
rm /etc/nginx/sites-available/"$SUBDOMAIN".dmz.rs.http
service nginx reload