63 lines
2.0 KiB
Bash
Executable File
63 lines
2.0 KiB
Bash
Executable File
#!/usr/local/bin/bash
|
|
|
|
# Copyright (c) 2018-2024, diyIT.org
|
|
# All rights reserved.
|
|
#
|
|
# BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License")
|
|
# https://diyit.org/license/
|
|
#
|
|
#
|
|
|
|
#web_jails=(cloud hub nivi rachna rishabh sharad web web-diyit web-rockwood ldap-mgr monitor)
|
|
|
|
#for i in ${web_jails[@]};
|
|
#do
|
|
# echo "restarting apache in web_jail $i after SSL update"
|
|
# iocage exec $i "service apache24 restart"
|
|
# # The majority of TLS/SSL servers require a full restart to re-load the certificates if the filename is unchanged.
|
|
#done
|
|
|
|
./jails-update-httpd.sh
|
|
|
|
ldap_jails=(ldap)
|
|
|
|
for i in ${ldap_jails[@]};
|
|
do
|
|
echo "restarting ldap in ldap_jail $i after SSL update"
|
|
iocage exec $i "service slapd restart"
|
|
done
|
|
|
|
echo "restarting haproxy in jail proxy after SSL update"
|
|
iocage exec proxy "service haproxy reload"
|
|
|
|
echo "regenerate dane tlsa records after SSL update"
|
|
iocage exec dns "/data/dns_update_serial.sh"
|
|
|
|
echo "restarting nginx in jail pkgp after SSL update"
|
|
iocage exec pkgp "service nginx restart"
|
|
# The majority of TLS/SSL servers require a full restart to re-load the certificates if the filename is unchanged.
|
|
|
|
echo "restarting mail in jail mail after SSL update"
|
|
iocage exec mail "service postfix stop"
|
|
iocage exec mail "service postfix start"
|
|
iocage exec mail "service dovecot stop"
|
|
iocage exec mail "service dovecot start"
|
|
|
|
echo "restarting synapse in jail matrix after SSL update"
|
|
iocage exec matrix "service synapse restart"
|
|
|
|
#echo "restarting ELK in jail monitor after SSL update"
|
|
iocage exec monitor "cp /mnt/certs/diy*.pem /usr/local/etc/elasticsearch/certs"
|
|
iocage exec monitor "cp /mnt/certs/cacert.pem /usr/local/etc/elasticsearch/certs"
|
|
|
|
exit
|
|
|
|
#iocage exec monitor "service elasticsearch restart"
|
|
#iocage exec monitor "service kibana restart"
|
|
|
|
#iocage exec monitor "service logstash restart"
|
|
#iocage exec monitor 'ps axww | grep logstash | cut -f1 -d" " | xargs -n 1 kill -9 '
|
|
#iocage exec monitor "/root/start_logstash.sh"
|
|
|
|
#iocage exec monitor "service heartbeat restart"
|