Skip to content

Commit 04fc163

Browse files
authored
Allow admins to run custom script after SSL is put to any domain
Useful if you have separated SSLs for each IP address. If admin add to vesta.conf this: UPDATE_SSL_SCRIPT='/usr/local/bin/update_ssl_script.sh' that script will be called after each domain get new SSL or renew old SSL. Then admin can write custom script that will, for example, copy new SSL to some file that is needed for dovecot or exim, for example... Passed parameters are $user and $domain ($1 and $2), so custom script can check what domain got new SSL, and then to run custom task...
1 parent 60ca03e commit 04fc163

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/v-add-web-domain-ssl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ if [ ! -z "$UPDATE_HOSTNAME_SSL" ] && [ "$UPDATE_HOSTNAME_SSL" = "yes" ]; then
127127
fi
128128
fi
129129

130+
if [ ! -z "$UPDATE_SSL_SCRIPT" ]; then
131+
eval "$UPDATE_SSL_SCRIPT $user $domain"
132+
fi
133+
130134
# Logging
131135
log_history "enabled ssl support for $domain"
132136
log_event "$OK" "$ARGUMENTS"

0 commit comments

Comments
 (0)