forked from sineverba/cfhookbash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.config.sh
executable file
·29 lines (19 loc) · 946 Bytes
/
deploy.config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
case ${1} in
"www.example.com")
#move certificate to private
cp /home/sineverba/dehydrated/certs/domain/cert.pem /var/www/domain/private/cert.pem
cp /home/sineverba/dehydrated/certs/domain/privkey.pem /var/www/domain/private/privkey.pem
cp /home/sineverba/dehydrated/certs/domain/fullchain.pem /var/www/domain/private/fullchain.pem
#restart nginx
service nginx restart
#exchange certificate for domoticz
rm /home/sineverba/domoticz/server_cert.pem
cat /var/www/domain/private/privkey.pem >> /home/sineverba/domoticz/server_cert.pem
cat /var/www/domain/private/fullchain.pem >> /home/sineverba/domoticz/server_cert.pem
cp /home/sineverba/domoticz/server_cert.pem /home/sineverba/domoticz/letsencrypt_server_cert.pem
#restart domoticz
/etc/init.d/domoticz.sh restart
#restart mysensors
service mysgw restart
;;
esac