#!/usr/local/bin/bash # Copyright (c) 2018-2021, 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-datavpc ldap-mgr r-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" done ldap_jails=(ldap r-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 "restarting nginx in jail pkgp after SSL update" iocage exec pkgp "service nginx reload" echo "restarting mail in jail mail after SSL update" iocage exec mail "service postfix restart" iocage exec mail "service dovecot restart" echo "restarting ELK in jail elk after SSL update" iocage exec elk "cp /mnt/certs/diy*.pem /usr/local/etc/elasticsearch/certs" iocage exec elk "cp /mnt/certs/cacert.pem /usr/local/etc/elasticsearch/certs" iocage exec elk "service elasticsearch restart" iocage exec elk "service kibana restart" #iocage exec elk "service logstash restart" iocage exec elk 'ps axww | grep logstash | cut -f1 -d" " | xargs -n 1 kill -9 ' iocage exec elk "/root/start_logstash.sh" iocage exec elk "service heartbeat restart"