3 # concat file atomic way
9 cp -f $file $file.dehydrated~
14 if [ ! -x /usr/sbin/lighttpd ] || [ ! -f /etc/lighttpd/server.pem ]; then
17 echo " + Hook: Overwritting /etc/lighttpd/server.pem and reloading lighttpd..."
18 atomic_concat /etc/lighttpd/server.pem "$FULLCHAINCERT" "$PRIVKEY"
19 /sbin/service lighttpd reload
23 if [ ! -x /usr/sbin/haproxy ] || [ ! -f /etc/haproxy/server.pem ]; then
26 echo " + Hook: Overwritting /etc/haproxy/server.pem and restarting haproxy..."
27 atomic_concat /etc/haproxy/server.pem "$FULLCHAINCERT" "$PRIVKEY"
28 /sbin/service haproxy reload
32 if [ ! -f /etc/nginx/server.crt ] || [ ! -f /etc/nginx/server.key ]; then
35 echo " + Hook: Overwritting /etc/nginx/server.{crt,key} and reloading nginx..."
36 atomic_concat /etc/nginx/server.crt "$FULLCHAINCERT"
37 atomic_concat /etc/nginx/server.key "$PRIVKEY"
38 /sbin/service nginx reload
42 if [ ! -x /etc/rc.d/init.d/httpd ]; then
45 echo " + Hook: Reloading Apache..."
46 /sbin/service httpd graceful
50 if [ ! -x /etc/rc.d/init.d/postfix ]; then
53 echo " + Hook: Reloading Postfix..."
54 /sbin/service postfix reload
58 if [ ! -x /etc/rc.d/init.d/dovecot ]; then
61 echo " + Hook: Reloading Dovecot..."
62 /sbin/service dovecot reload