function rdpproxy() { $unix = new unix(); $php = $unix->LOCATE_PHP5_BIN(); $INITD_PATH = "/etc/init.d/rdpproxy"; $php5script = "exec.rdpproxy.php"; $daemonbinLog = "RDP Proxy Daemon"; $f[] = "#!/bin/sh"; $f[] = "### BEGIN INIT INFO"; $f[] = "# Provides: rdpproxy"; $f[] = "# Required-Start: \$local_fs \$syslog"; $f[] = "# Required-Stop: \$local_fs \$syslog"; $f[] = "# Should-Start:"; $f[] = "# Should-Stop:"; $f[] = "# Default-Start: 2 3 4 5"; $f[] = "# Default-Stop: 0 1 6"; $f[] = "# Short-Description: {$daemonbinLog}"; $f[] = "# chkconfig: - 80 75"; $f[] = "# description: {$daemonbinLog}"; $f[] = "### END INIT INFO"; $f[] = "case \"\$1\" in"; $f[] = " start)"; $f[] = " {$php} /usr/share/artica-postfix/{$php5script} --start \$2 \$3"; $f[] = " ;;"; $f[] = ""; $f[] = " stop)"; $f[] = " {$php} /usr/share/artica-postfix/{$php5script} --stop \$2 \$3"; $f[] = " ;;"; $f[] = ""; $f[] = " restart)"; $f[] = " {$php} /usr/share/artica-postfix/{$php5script} --restart \$2 \$3"; $f[] = " ;;"; $f[] = ""; $f[] = " reconfigure)"; $f[] = " {$php} /usr/share/artica-postfix/{$php5script} --build \$2 \$3"; $f[] = " ;;"; $f[] = ""; $f[] = " *)"; $f[] = " echo \"Usage: \$0 {start|stop|restart|reconfigure} (+ '--verbose' for more infos)\""; $f[] = " exit 1"; $f[] = " ;;"; $f[] = "esac"; $f[] = "exit 0\n"; echo "{$daemonbinLog}: [INFO] Writing {$INITD_PATH} with new config\n"; @unlink($INITD_PATH); @file_put_contents($INITD_PATH, @implode("\n", $f)); @chmod($INITD_PATH, 0755); if (is_file('/usr/sbin/update-rc.d')) { shell_exec("/usr/sbin/update-rc.d -f " . basename($INITD_PATH) . " defaults >/dev/null 2>&1"); } if (is_file('/sbin/chkconfig')) { shell_exec("/sbin/chkconfig --add " . basename($INITD_PATH) . " >/dev/null 2>&1"); shell_exec("/sbin/chkconfig --level 345 " . basename($INITD_PATH) . " on >/dev/null 2>&1"); } rdpproxy_authhook(); }
$conf[] = squid_master_status(true); $conf[] = kav4Proxy_status(); $conf[] = proxy_pac_status(); $conf[] = squidguardweb(); $conf[] = ufdbguardd(); $conf[] = freshclam(); $conf[] = articadb(); $conf[] = winbindd(); $conf[] = squid_db(); $conf[] = haarp(); $conf[] = nginx(); $conf[] = ftp_proxy(); $conf[] = c_icap_master_status(); $conf[] = cntlm(); $conf[] = cntlm_parent(); $conf[] = rdpproxy_authhook(); $conf[] = rdpproxy(); $conf[] = clamd(); $conf[] = dnsmasq(); $conf[] = ufdbguardd_client(); $conf[] = ucarp(); $conf[] = hotspot_web(); $conf[] = hotspot_fw(); $conf[] = squid_nat(); $conf[] = ziproxy(); $conf[] = ufdbcat(); $conf[] = HyperCacheWeb(); $conf[] = InfluxDB(); $conf[] = squid_tail(); $conf[] = iptables_transparent(); if (is_file($cachefile)) {