-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_2.php
74 lines (56 loc) · 2.06 KB
/
install_2.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
// second part of install.
// first part installs mailserver, then, install2 begins,
// i separated these installs because php email function does not work if i re-start php after email install...
// install functions in install_lib.php
include_once('install_lib.php');
include_once('install2.1.php');
if($argc>1) {
print "argc:$argc\n\n";
if($argv[1]=='noapt') {
$noapt="noapt";
echo "apt-get install disabled due to parameter:noapt \n";
}
}
echo "\nincluded install2.1.php\nhere are variables transfered:\n";
echo
"
webdizin:$webdizin
ip:$ip
user_name:$user_name
user_email:$user_email
hostname:$hostname
installextrasoftware: $installextrasoftware
";
/*
ehcpmysqlpass:$ehcpmysqlpass
rootpass:$rootpass
newrootpass:$newrootpass
ehcpadminpass:$ehcpadminpass
*/
installsql();
install_vsftpd_server();
#infomail('_5_vsftpd install finished');
#install_nginx_webserver();
installapacheserver();
# scandb(); no more need to scan db since ver. 0.29.15
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="
your ehcp install finished. if you have questions or need help, please visit www.ehcp.net, ehcp forums or email me to [email protected]
ehcp 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 [email protected] adresine eposta gönderin.
https://launchpad.net/ehcp bu adresi de kullanabilirsiniz.
ehcp developer..
";
if($user_email<>'') mail($user_email,'your ehcp install finished..have fun',$msg,'From: [email protected]');
$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");
?>