&1 | /usr/local/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &" > /dev/null } svscan_stop_post () { echo "Stopping svscan." find -L "\$svscan_servicedir" -mindepth 1 -maxdepth 2 -type d \( \! -path "\$svscan_servicedir/*/*" -or -name 'log' \) -print0 | xargs -0 /usr/local/bin/svc -dx } run_rc_command "\$1" EOD; fwrite($fd, $svscan); fclose($fd); conf_mount_ro(); } function tinydns_custom_php_deinstall_command() { global $g, $config; conf_mount_rw(); /* destroy all daemontools items */ exec("/usr/sbin/pw groupdel Gtinydns"); exec("/usr/sbin/pw groupdel Gdnslog"); exec("/usr/sbin/pw userdel Gtinydns"); exec("/usr/sbin/pw userdel Gdnslog"); conf_mount_ro(); } function tinydns_custom_php_changeip_command() { global $g, $config; conf_mount_rw(); $ip = $config['installedpackages']['tinydns']['config'][0]['ipaddress']; /* setup daemon tools service area */ exec("/usr/sbin/pw useradd Gtinydns"); exec("/usr/sbin/pw useradd Gdnslog"); exec("/usr/local/bin/tinydns-conf Gtinydns Gdnslog /etc/tinydns {$ip}"); exec("/bin/ln -s /etc/tinydns /service"); sleep(5); exec("/usr/local/bin/svstat /service/tinydns"); conf_mount_ro(); } function tinydns_create_zone_file() { global $g, $config; conf_mount_rw(); $fd = fopen("/service/tinydns/root/data", "w"); if($config['installedpackages']['tinydnsdomains']) foreach($config['installedpackages']['tinydnsdomains'] as $domain) fwrite($fd, $domain['recordtype'] . ":" . $domain['hostname'] . "\n"); fclose($fd); /* tell tinydns to reload zone file */ exec("cd /service/tinydns/root && /usr/local/bin/tinydns-data"); conf_mount_ro(); } ?>