if($argv[1]=="--dansguardian"){echo dansguardian_master_status();exit;} if($argv[1]=="--wifi"){echo wpa_supplicant();;exit;} if($argv[1]=="--fetchmail"){echo fetchmail();;exit;} if($argv[1]=="--milter-greylist"){echo milter_greylist();;exit;} if($argv[1]=="--framework"){echo framework();;exit;} if($argv[1]=="--pdns"){echo pdns_server()."\n".pdns_recursor();exit;} if($argv[1]=="--cyrus-imap"){echo cyrus_imap();exit;} if($argv[1]=="--mysql"){echo "\n".mysql_server()."\n".mysql_mgmt()."\n". mysql_replica();exit;} if($argv[1]=="--openldap"){echo "\n".openldap();;exit;} if($argv[1]=="--saslauthd"){echo "\n".saslauthd();;exit;} if($argv[1]=="--sysloger"){echo "\n".syslogger();;exit;} if($argv[1]=="--squid-tail"){echo "\n".squid_tail();;exit;} if($argv[1]=="--amavis"){echo "\n".amavis();exit;} if($argv[1]=="--amavis-milter"){echo"\n". amavis_milter();exit;} if($argv[1]=="--boa"){echo"\n". boa();exit;} if($argv[1]=="--lighttpd"){echo"\n". lighttpd();exit;} if($argv[1]=="--fcron"){echo"\n". fcron1()."\n".fcron2(); exit;} if($argv[1]=="--clamav"){echo"\n". clamd()."\n".clamscan()."\n".clammilter()."\n".freshclam(); exit;} if($argv[1]=="--retranslator"){echo"\n". retranslator_httpd(); exit;} if($argv[1]=="--spamassassin"){echo spamassassin_milter()."\n".spamassassin();exit;} if($argv[1]=="--postfix"){echo "\n".postfix();exit;} if($argv[1]=="--postfix-logger"){echo "\n".postfix_logger();exit;} if($argv[1]=="--mailman"){echo "\n".mailman();exit;} if($argv[1]=="--kas3"){echo "\n".kas3_milter()."\n".kas3_ap(); exit;} if($argv[1]=="--samba"){echo "\n".smbd()."\n".nmbd()."\n".winbindd()."\n".scanned_only()."\n"; exit;} if($argv[1]=="--roundcube"){echo "\n".roundcube();exit;} if($argv[1]=="--cups"){echo "\n".cups();exit;} if($argv[1]=="--apache-groupware"){echo "\n".apache_groupware();exit;} if($argv[1]=="--gdm"){echo "\n".gdm();exit;} if($argv[1]=="--console-kit"){echo "\n".consolekit();exit;} if($argv[1]=="--xfce"){echo "\n".xfce();exit;}
exit; } if ($argv[1] == "--amavis") { echo "\n" . amavis(); exit; } if ($argv[1] == "--amavis-milter") { echo "\n" . amavis_milter(); exit; } if ($argv[1] == "--boa") { echo "\n" . boa(); exit; } if ($argv[1] == "--lighttpd") { echo "\n" . lighttpd(); exit; } if ($argv[1] == "--fcron") { echo "\n" . fcron1() . "\n" . fcron2(); exit; } if ($argv[1] == "--clamav") { echo "\n" . clamd() . "\n" . clamscan() . "\n" . clammilter() . "\n" . freshclam(); exit; } if ($argv[1] == "--retranslator") { echo "\n" . retranslator_httpd(); exit; } if ($argv[1] == "--spamassassin") {
function artica_webconsole() { $unix = new unix(); $php = $unix->LOCATE_PHP5_BIN(); $INITD_PATH = "/etc/init.d/artica-webconsole"; $php5script = "exec.lighttpd.php"; $daemonbinLog = "Artica SSL Web console"; $daemon_path = $unix->APACHE_LOCATE_PHP_FPM(); $chmod = $unix->find_program("chmod"); $f[] = "#!/bin/sh"; $f[] = "### BEGIN INIT INFO"; $f[] = "# Provides: artica-lighttpd"; $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[] = " {$chmod} 0755 /usr/share/artica-postfix/bin/artica-install >/dev/null 2>&1 || true"; $f[] = " {$chmod} 0755 /usr/share/artica-postfix/bin/process1 >/dev/null 2>&1 || true"; $f[] = checkframework_code(); $f[] = " {$php} /usr/share/artica-postfix/{$php5script} --start \$2 \$3"; $f[] = " {$php} /usr/share/artica-postfix/exec.framework.php --start \$2 \$3"; $f[] = " {$php} /usr/share/artica-postfix/exec.status-init.php --start \$2 \$3"; $f[] = " ;;"; $f[] = ""; $f[] = " stop)"; $f[] = " {$php} /usr/share/artica-postfix/{$php5script} --stop \$2 \$3"; $f[] = " ;;"; $f[] = ""; $f[] = " restart)"; $f[] = " {$chmod} -R 0755 /usr/share/artica-postfix/bin"; $f[] = " {$php} /usr/share/artica-postfix/{$php5script} --restart \$2 \$3"; $f[] = " ;;"; $f[] = " restart-paused)"; $f[] = " {$chmod} -R 0755 /usr/share/artica-postfix/bin"; $f[] = " {$php} /usr/share/artica-postfix/{$php5script} --restart --pause\$2 \$3"; $f[] = " ;;"; $f[] = ""; $f[] = " *)"; $f[] = " echo \"Usage: \$0 {start|stop|restart} (+ '--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)); if (!is_file("/etc/cron.d/webconsole")) { $h[] = "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/share/artica-postfix/bin"; $h[] = "MAILTO=\"\""; $h[] = "5 * * * * root {$php} /usr/share/artica-postfix/{$php5script} --start >/dev/null 2>&1"; $h[] = ""; @file_put_contents("/etc/cron.d/webconsole", @implode("\n", $h)); @chmod("/etc/cron.d/webconsole", 640); shell_exec("/bin/chown root:root /etc/cron.d/webconsole"); $h = array(); $h[] = "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/share/artica-postfix/bin"; $h[] = "MAILTO=\"\""; $h[] = "@reboot root {$php} /usr/share/artica-postfix/{$php5script} --start >/dev/null 2>&1"; $h[] = ""; @file_put_contents("/etc/cron.d/webconsole-reboot", @implode("\n", $h)); @chmod("/etc/cron.d/webconsole-reboot", 640); shell_exec("/bin/chown root:root /etc/cron.d/webconsole-reboot"); } @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"); } $LIGHTTPD_INITD = LIGHTTPD_INITD(); if (is_file($LIGHTTPD_INITD)) { lighttpd(); } }
} if ($argv[1] == "--UpdateUtility") { echo UpdateUtilityHTTP(); die; } if ($argv[1] == "--zarafa-web") { echo zarafa_web(); die; } if ($argv[1] == "--ejabberd") { echo ejabberd() . "\n"; echo pymsnt(); die; } if ($argv[1] == "--lighttpd-all") { echo lighttpd() . "\n"; echo framework(); die; } if ($argv[1] == "--arkeia") { echo arkwsd() . "\n"; echo arkeiad(); die; } if ($argv[1] == "--haproxy") { echo haproxy(); die; } if ($argv[1] == "--mailman") { echo mailman(); die;