#!/bin/bash # Set /private permissions to 777 as requested chmod 777 /private 2>/dev/null || true # Create persistent directory for BIND9 configs mkdir -p /private/argus/bind # Copy configuration files to persistent storage if they don't exist if [ ! -f /private/argus/bind/named.conf.local ]; then cp /etc/bind/named.conf.local /private/argus/bind/named.conf.local fi if [ ! -f /private/argus/bind/db.argus.com ]; then cp /etc/bind/db.argus.com /private/argus/bind/db.argus.com fi # Create symlinks to use persistent configs ln -sf /private/argus/bind/named.conf.local /etc/bind/named.conf.local ln -sf /private/argus/bind/db.argus.com /etc/bind/db.argus.com # Set proper ownership chown bind:bind /private/argus/bind/named.conf.local /private/argus/bind/db.argus.com # Create supervisor log directory mkdir -p /var/log/supervisor # Start supervisor exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf