if [ -f "$domain_file" ]; then
# don't destroy, just shuffle.
\mv -f "$domain_file" "/tmp/$(basename ${domain_file})-old-${RANDOM}"
if [ -f "$domain_file" ]; then
# don't destroy, just shuffle.
\mv -f "$domain_file" "/tmp/$(basename ${domain_file})-old-${RANDOM}"
- chown "$(logname):$(logname)" /etc/bind/named.conf.local
- test_or_die "setting ownership on: /etc/bind/named.conf.local"
+ chown "$(fm_username):$(fm_username)" /etc/bind/named.conf.local
+ exit_on_error "setting ownership on: /etc/bind/named.conf.local"
- chown "$(logname):$(logname)" "/etc/bind/${containing_domain}.conf"
- test_or_die "setting ownership on: /etc/bind/${containing_domain}.conf"
+ chown "$(fm_username):$(fm_username)" "/etc/bind/${containing_domain}.conf"
+ exit_on_error "setting ownership on: /etc/bind/${containing_domain}.conf"
if [ -f "$site_config" ]; then
# don't destroy, just shuffle.
\mv -f "$site_config" "/tmp/$(basename ${site_config})-old-${RANDOM}"
if [ -f "$site_config" ]; then
# don't destroy, just shuffle.
\mv -f "$site_config" "/tmp/$(basename ${site_config})-old-${RANDOM}"
- chown "$(logname):$(logname)" "$site_config"
- test_or_die "setting ownership on: $site_config"
+ chown "$(fm_username):$(fm_username)" "$site_config"
+ exit_on_error "setting ownership on: $site_config"
- chown $(logname) "$chow_path"
- test_or_die "changing ownership to user failed on the path: $chow_path"
+ chown "$(fm_username):$(fm_username)" "$chow_path"
+ exit_on_error "changing ownership to user failed on the path: $chow_path"