1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-23 02:27:05 +00:00
mailinabox/tools/web_update
2023-08-15 14:06:19 +02:00

13 lines
435 B
Bash
Executable File

#!/bin/bash
rm -f /etc/nginx/conf.d/local.conf
curl -s -d POSTDATA --user $(</var/lib/mailinabox/api.key): http://127.0.0.1:10222/web/update
cd /etc/nginx/sites-available
for f in miab_*
do
if ! [ -f "/etc/nginx/sites-enabled/$f" ]; then
echo "Processing $f"
ln -s "/etc/nginx/sites-available/$f" "/etc/nginx/sites-enabled/$f"
fi
done
curl -s -d POSTDATA --user $(</var/lib/mailinabox/api.key): http://127.0.0.1:10222/web/update