Commit 88e496eb authored by Michael Kropat's avatar Michael Kropat

Update setup scripts to auth against the API

parent 447399e8
...@@ -68,7 +68,7 @@ cat > /etc/cron.daily/mailinabox-dnssec << EOF; ...@@ -68,7 +68,7 @@ cat > /etc/cron.daily/mailinabox-dnssec << EOF;
#!/bin/bash #!/bin/bash
# Mail-in-a-Box # Mail-in-a-Box
# Re-sign any DNS zones with DNSSEC because the signatures expire periodically. # Re-sign any DNS zones with DNSSEC because the signatures expire periodically.
curl -d GO http://localhost:10222/dns/update curl -d GO --user \$(</var/lib/mailinabox/api.key): http://localhost:10222/dns/update
EOF EOF
chmod +x /etc/cron.daily/mailinabox-dnssec chmod +x /etc/cron.daily/mailinabox-dnssec
......
...@@ -133,8 +133,8 @@ EOF ...@@ -133,8 +133,8 @@ EOF
# Write the DNS and nginx configuration files. # Write the DNS and nginx configuration files.
sleep 5 # wait for the daemon to start sleep 5 # wait for the daemon to start
curl -s -d POSTDATA http://127.0.0.1:10222/dns/update curl -s -d POSTDATA --user $(</var/lib/mailinabox/api.key): http://127.0.0.1:10222/dns/update
curl -s -d POSTDATA http://127.0.0.1:10222/web/update curl -s -d POSTDATA --user $(</var/lib/mailinabox/api.key): http://127.0.0.1:10222/web/update
# If there aren't any mail users yet, create one. # If there aren't any mail users yet, create one.
if [ -z "`tools/mail.py user`" ]; then if [ -z "`tools/mail.py user`" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment