install_vsftpd_server(); #infomail('_5_vsftpd install finished'); if (isset($version) && $version != "12.10") { install_nginx_webserver(); } else { echo "Ubuntu 12.10 is not compatible with nginx due to bugs. Installing apache2 only. Upgrade to Ubuntu 13.04 for this functionality.\n"; } installapacheserver(); # scandb(); no more need to scan db since ver. 0.29.15 install_net2ftp(); installfinish(); $message = ''; exec('ifconfig', $msg); exec('ps aux ', $msg); foreach ($msg as $m) { $message .= $m . "\n"; } #infomail("_6_install finished.mail from inside php.user:$user_name,$user_email,$yesno",$message); $msg = "\nyour ehcp install finished. if you have questions or need help, please visit www.ehcp.net, ehcp forums or email me to info@ehcp.net\n\nehcp kurulumunuz tamamlandı. tebrikler. eğer sorularınız varsa ya da yardıma ihtiyacınız varsa, ehcp.net deki forum kısmına soru yazın veya info@ehcp.net adresine eposta gönderin.\nhttps://launchpad.net/ehcp bu adresi de kullanabilirsiniz.\n\nehcp developer..\n"; if ($user_email != '' and $emailenable) { mail($user_email, 'your ehcp install finished..have fun', $msg, 'From: info@ehcp.net'); } $realip = getlocalip2(); if (!$app->isPrivateIp($ip)) { $realip .= "-realip"; } # change subject if this is a server with real ip... $ip2 = trim(file_get_contents("http://ehcp.net/diger/myip.php")); $message .= "\noutside Ip detected:{$ip2}"; infomail("_7_install finished.{$realip}.{$ip2}.mail from inside php.user:{$user_name},{$user_email},{$yesno}", $message); #infomailusingwget("7_ehcp_install2.php.finished");
function infomailusingwget($str) { global $user_name, $user_email, $localip, $ehcpversion, $emailenable; if (!$emailenable) { return False; } echo "please wait...\n"; $ip = getlocalip2(); $str = str_replace(" ", "_", $str); # because in url, space breaks variable msg in url #$command="wget -q -O /dev/null --timeout=15 \"http://www.ehcp.net/diger/msg.php?msg=$ehcpversion-ip:$ip,$str&name=$user_name&email=$user_email&ip=$ip\""; $url = "http://www.ehcp.net/diger/msg.php?msg={$ehcpversion}-ip:{$ip},{$str}&name={$user_name}&email={$user_email}&ip={$ip}"; //echo "command: $command \n"; #passthru($command); file_get_contents($url); }