mirror of
https://github.com/DO1JLR/ansible_role_nginx.git
synced 2024-08-16 16:19:48 +02:00
17 lines
356 B
Bash
17 lines
356 B
Bash
|
#!/bin/bash
|
||
|
set -euf -o pipefail
|
||
|
|
||
|
IFS=$'\n'
|
||
|
|
||
|
EVENT_NAME="$1"
|
||
|
[ "$EVENT_NAME" = "live-updated" ] || exit 42
|
||
|
|
||
|
while read -r host; do
|
||
|
if [[ -e "/etc/nginx/sites-available/${host}_tls" ]]; then
|
||
|
echo "Enabling tls site for ${host}"
|
||
|
ln -s -f "/etc/nginx/sites-available/${host}_tls" "/etc/nginx/sites-enabled/${host}_tls"
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
exit 0
|