Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Jozef Sroka
ISPConfig 3
Commits
526b997c
Commit
526b997c
authored
Feb 22, 2013
by
tbrehm
Browse files
Merged revisions 3803-3844 from stable branch.
parent
72695f03
Changes
465
Hide whitespace changes
Inline
Side-by-side
install/dist/conf/centos52.conf.php
View file @
526b997c
...
...
@@ -99,6 +99,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
]
=
'/etc/'
;
$conf
[
'fastcgi'
][
'fastcgi_starter_path'
]
=
'/var/www/php-fcgi-scripts/[system_user]/'
;
$conf
[
'fastcgi'
][
'fastcgi_bin'
]
=
'/usr/bin/php-cgi'
;
//* Postfix
$conf
[
'postfix'
][
'installed'
]
=
false
;
// will be detected automatically during installation
...
...
install/dist/conf/centos53.conf.php
View file @
526b997c
...
...
@@ -99,6 +99,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
]
=
'/etc/'
;
$conf
[
'fastcgi'
][
'fastcgi_starter_path'
]
=
'/var/www/php-fcgi-scripts/[system_user]/'
;
$conf
[
'fastcgi'
][
'fastcgi_bin'
]
=
'/usr/bin/php-cgi'
;
//* Postfix
$conf
[
'postfix'
][
'installed'
]
=
false
;
// will be detected automatically during installation
...
...
install/dist/conf/debian40.conf.php
View file @
526b997c
...
...
@@ -101,6 +101,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
]
=
'/etc/php5/cgi/'
;
$conf
[
'fastcgi'
][
'fastcgi_starter_path'
]
=
'/var/www/php-fcgi-scripts/[system_user]/'
;
$conf
[
'fastcgi'
][
'fastcgi_bin'
]
=
'/usr/bin/php-cgi'
;
//* Postfix
$conf
[
'postfix'
][
'installed'
]
=
false
;
// will be detected automatically during installation
...
...
install/dist/conf/debian60.conf.php
View file @
526b997c
...
...
@@ -101,6 +101,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
]
=
'/etc/php5/cgi/'
;
$conf
[
'fastcgi'
][
'fastcgi_starter_path'
]
=
'/var/www/php-fcgi-scripts/[system_user]/'
;
$conf
[
'fastcgi'
][
'fastcgi_bin'
]
=
'/usr/bin/php-cgi'
;
//* Postfix
$conf
[
'postfix'
][
'installed'
]
=
false
;
// will be detected automatically during installation
...
...
install/dist/conf/fedora9.conf.php
View file @
526b997c
...
...
@@ -99,6 +99,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
]
=
'/etc/'
;
$conf
[
'fastcgi'
][
'fastcgi_starter_path'
]
=
'/var/www/php-fcgi-scripts/[system_user]/'
;
$conf
[
'fastcgi'
][
'fastcgi_bin'
]
=
'/usr/bin/php-cgi'
;
//* Postfix
$conf
[
'postfix'
][
'installed'
]
=
false
;
// will be detected automatically during installation
...
...
install/dist/conf/gentoo.conf.php
View file @
526b997c
...
...
@@ -112,6 +112,7 @@ $conf['awstats']['buildstaticpages_pl'] = '/usr/bin/awstats_buildstaticpages.pl'
//* Fastcgi
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
]
=
'/etc/php/cgi-php5'
;
$conf
[
'fastcgi'
][
'fastcgi_starter_path'
]
=
'/var/www/php-fcgi-scripts/[system_user]/'
;
$conf
[
'fastcgi'
][
'fastcgi_bin'
]
=
'/usr/bin/php-cgi'
;
//* Postfix
$conf
[
'postfix'
][
'installed'
]
=
false
;
// will be detected automatically during installation
...
...
install/dist/conf/opensuse110.conf.php
View file @
526b997c
...
...
@@ -99,6 +99,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
]
=
'/etc/php5/fastcgi/'
;
$conf
[
'fastcgi'
][
'fastcgi_starter_path'
]
=
'/srv/www/php-fcgi-scripts/[system_user]/'
;
$conf
[
'fastcgi'
][
'fastcgi_bin'
]
=
'/usr/bin/php-cgi'
;
//* Postfix
$conf
[
'postfix'
][
'installed'
]
=
false
;
// will be detected automatically during installation
...
...
install/dist/conf/opensuse112.conf.php
View file @
526b997c
...
...
@@ -99,6 +99,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
]
=
'/etc/php5/fastcgi/'
;
$conf
[
'fastcgi'
][
'fastcgi_starter_path'
]
=
'/srv/www/php-fcgi-scripts/[system_user]/'
;
$conf
[
'fastcgi'
][
'fastcgi_bin'
]
=
'/usr/bin/php-cgi'
;
//* Postfix
$conf
[
'postfix'
][
'installed'
]
=
false
;
// will be detected automatically during installation
...
...
install/dist/lib/centos52.lib.php
View file @
526b997c
...
...
@@ -30,6 +30,79 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
class
installer
extends
installer_dist
{
public
function
configure_mailman
(
$status
=
'insert'
)
{
global
$conf
;
$config_dir
=
$conf
[
'mailman'
][
'config_dir'
]
.
'/'
;
$full_file_name
=
$config_dir
.
'mm_cfg.py'
;
//* Backup exiting file
if
(
is_file
(
$full_file_name
))
{
copy
(
$full_file_name
,
$config_dir
.
'mm_cfg.py~'
);
}
// load files
$content
=
rf
(
'tpl/mm_cfg.py.master'
);
$old_file
=
rf
(
$full_file_name
);
$old_options
=
array
();
$lines
=
explode
(
"
\n
"
,
$old_file
);
foreach
(
$lines
as
$line
)
{
if
(
trim
(
$line
)
!=
''
&&
substr
(
$line
,
0
,
1
)
!=
'#'
)
{
@
list
(
$key
,
$value
)
=
@
explode
(
"="
,
$line
);
if
(
!
empty
(
$value
))
{
$key
=
rtrim
(
$key
);
$old_options
[
$key
]
=
trim
(
$value
);
}
}
}
$config_dir
=
$conf
[
'mailman'
][
'config_dir'
]
.
'/'
;
$full_file_name
=
$config_dir
.
'virtual_to_transport.sh'
;
//* Backup exiting virtual_to_transport.sh script
if
(
is_file
(
$full_file_name
))
{
copy
(
$full_file_name
,
$config_dir
.
'virtual_to_transport.sh~'
);
}
copy
(
'tpl/mailman-virtual_to_transport.sh'
,
$full_file_name
);
chgrp
(
$full_file_name
,
'mailman'
);
chmod
(
$full_file_name
,
0750
);
if
(
!
is_file
(
'/var/lib/mailman/data/transport-mailman'
))
touch
(
'/var/lib/mailman/data/transport-mailman'
);
exec
(
'/usr/sbin/postmap /var/lib/mailman/data/transport-mailman'
);
exec
(
'/usr/lib/mailman/bin/genaliases 2>/dev/null'
);
$virtual_domains
=
''
;
if
(
$status
==
'update'
)
{
// create virtual_domains list
$domainAll
=
$this
->
db
->
queryAllRecords
(
"SELECT domain FROM mail_mailinglist GROUP BY domain"
);
if
(
is_array
(
$domainAll
))
{
foreach
(
$domainAll
as
$domain
)
{
if
(
$domainAll
[
0
][
'domain'
]
==
$domain
[
'domain'
])
$virtual_domains
.
=
"'"
.
$domain
[
'domain'
]
.
"'"
;
else
$virtual_domains
.
=
", '"
.
$domain
[
'domain'
]
.
"'"
;
}
}
}
else
$virtual_domains
=
"' '"
;
$content
=
str_replace
(
'{hostname}'
,
$conf
[
'hostname'
],
$content
);
if
(
!
isset
(
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
]))
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
]
=
''
;
$content
=
str_replace
(
'{default_language}'
,
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
],
$content
);
$content
=
str_replace
(
'{virtual_domains}'
,
$virtual_domains
,
$content
);
wf
(
$full_file_name
,
$content
);
}
public
function
configure_amavis
()
{
global
$conf
;
...
...
install/dist/lib/centos53.lib.php
View file @
526b997c
...
...
@@ -30,6 +30,79 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
class
installer
extends
installer_dist
{
public
function
configure_mailman
(
$status
=
'insert'
)
{
global
$conf
;
$config_dir
=
$conf
[
'mailman'
][
'config_dir'
]
.
'/'
;
$full_file_name
=
$config_dir
.
'mm_cfg.py'
;
//* Backup exiting file
if
(
is_file
(
$full_file_name
))
{
copy
(
$full_file_name
,
$config_dir
.
'mm_cfg.py~'
);
}
// load files
$content
=
rf
(
'tpl/mm_cfg.py.master'
);
$old_file
=
rf
(
$full_file_name
);
$old_options
=
array
();
$lines
=
explode
(
"
\n
"
,
$old_file
);
foreach
(
$lines
as
$line
)
{
if
(
trim
(
$line
)
!=
''
&&
substr
(
$line
,
0
,
1
)
!=
'#'
)
{
@
list
(
$key
,
$value
)
=
@
explode
(
"="
,
$line
);
if
(
!
empty
(
$value
))
{
$key
=
rtrim
(
$key
);
$old_options
[
$key
]
=
trim
(
$value
);
}
}
}
$config_dir
=
$conf
[
'mailman'
][
'config_dir'
]
.
'/'
;
$full_file_name
=
$config_dir
.
'virtual_to_transport.sh'
;
//* Backup exiting virtual_to_transport.sh script
if
(
is_file
(
$full_file_name
))
{
copy
(
$full_file_name
,
$config_dir
.
'virtual_to_transport.sh~'
);
}
copy
(
'tpl/mailman-virtual_to_transport.sh'
,
$full_file_name
);
chgrp
(
$full_file_name
,
'mailman'
);
chmod
(
$full_file_name
,
0750
);
if
(
!
is_file
(
'/var/lib/mailman/data/transport-mailman'
))
touch
(
'/var/lib/mailman/data/transport-mailman'
);
exec
(
'/usr/sbin/postmap /var/lib/mailman/data/transport-mailman'
);
exec
(
'/usr/lib/mailman/bin/genaliases 2>/dev/null'
);
$virtual_domains
=
''
;
if
(
$status
==
'update'
)
{
// create virtual_domains list
$domainAll
=
$this
->
db
->
queryAllRecords
(
"SELECT domain FROM mail_mailinglist GROUP BY domain"
);
if
(
is_array
(
$domainAll
))
{
foreach
(
$domainAll
as
$domain
)
{
if
(
$domainAll
[
0
][
'domain'
]
==
$domain
[
'domain'
])
$virtual_domains
.
=
"'"
.
$domain
[
'domain'
]
.
"'"
;
else
$virtual_domains
.
=
", '"
.
$domain
[
'domain'
]
.
"'"
;
}
}
}
else
$virtual_domains
=
"' '"
;
$content
=
str_replace
(
'{hostname}'
,
$conf
[
'hostname'
],
$content
);
if
(
!
isset
(
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
]))
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
]
=
''
;
$content
=
str_replace
(
'{default_language}'
,
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
],
$content
);
$content
=
str_replace
(
'{virtual_domains}'
,
$virtual_domains
,
$content
);
wf
(
$full_file_name
,
$content
);
}
public
function
configure_amavis
()
{
global
$conf
;
...
...
install/dist/lib/fedora.lib.php
View file @
526b997c
...
...
@@ -29,6 +29,79 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
class
installer_dist
extends
installer_base
{
public
function
configure_mailman
(
$status
=
'insert'
)
{
global
$conf
;
$config_dir
=
$conf
[
'mailman'
][
'config_dir'
]
.
'/'
;
$full_file_name
=
$config_dir
.
'mm_cfg.py'
;
//* Backup exiting file
if
(
is_file
(
$full_file_name
))
{
copy
(
$full_file_name
,
$config_dir
.
'mm_cfg.py~'
);
}
// load files
$content
=
rf
(
'tpl/mm_cfg.py.master'
);
$old_file
=
rf
(
$full_file_name
);
$old_options
=
array
();
$lines
=
explode
(
"
\n
"
,
$old_file
);
foreach
(
$lines
as
$line
)
{
if
(
trim
(
$line
)
!=
''
&&
substr
(
$line
,
0
,
1
)
!=
'#'
)
{
@
list
(
$key
,
$value
)
=
@
explode
(
"="
,
$line
);
if
(
!
empty
(
$value
))
{
$key
=
rtrim
(
$key
);
$old_options
[
$key
]
=
trim
(
$value
);
}
}
}
$config_dir
=
$conf
[
'mailman'
][
'config_dir'
]
.
'/'
;
$full_file_name
=
$config_dir
.
'virtual_to_transport.sh'
;
//* Backup exiting virtual_to_transport.sh script
if
(
is_file
(
$full_file_name
))
{
copy
(
$full_file_name
,
$config_dir
.
'virtual_to_transport.sh~'
);
}
copy
(
'tpl/mailman-virtual_to_transport.sh'
,
$full_file_name
);
chgrp
(
$full_file_name
,
'mailman'
);
chmod
(
$full_file_name
,
0750
);
if
(
!
is_file
(
'/var/lib/mailman/data/transport-mailman'
))
touch
(
'/var/lib/mailman/data/transport-mailman'
);
exec
(
'/usr/sbin/postmap /var/lib/mailman/data/transport-mailman'
);
exec
(
'/usr/lib/mailman/bin/genaliases 2>/dev/null'
);
$virtual_domains
=
''
;
if
(
$status
==
'update'
)
{
// create virtual_domains list
$domainAll
=
$this
->
db
->
queryAllRecords
(
"SELECT domain FROM mail_mailinglist GROUP BY domain"
);
if
(
is_array
(
$domainAll
))
{
foreach
(
$domainAll
as
$domain
)
{
if
(
$domainAll
[
0
][
'domain'
]
==
$domain
[
'domain'
])
$virtual_domains
.
=
"'"
.
$domain
[
'domain'
]
.
"'"
;
else
$virtual_domains
.
=
", '"
.
$domain
[
'domain'
]
.
"'"
;
}
}
}
else
$virtual_domains
=
"' '"
;
$content
=
str_replace
(
'{hostname}'
,
$conf
[
'hostname'
],
$content
);
if
(
!
isset
(
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
]))
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
]
=
''
;
$content
=
str_replace
(
'{default_language}'
,
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
],
$content
);
$content
=
str_replace
(
'{virtual_domains}'
,
$virtual_domains
,
$content
);
wf
(
$full_file_name
,
$content
);
}
function
configure_postfix
(
$options
=
''
)
{
...
...
@@ -957,6 +1030,7 @@ class installer_dist extends installer_base {
exec
(
"ln -s
$vhost_conf_dir
/ispconfig.vhost
$vhost_conf_enabled_dir
/000-ispconfig.vhost"
);
}
/*
exec('mkdir -p /var/www/php-fcgi-scripts/ispconfig');
exec('cp tpl/apache_ispconfig_fcgi_starter.master /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter');
exec('chmod +x /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter');
...
...
@@ -964,6 +1038,17 @@ class installer_dist extends installer_base {
exec('chown -R ispconfig:ispconfig /var/www/php-fcgi-scripts/ispconfig');
replaceLine('/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter','PHPRC=','PHPRC=/etc/',0,0);
*/
if
(
!
is_file
(
'/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
))
{
$content
=
rf
(
'tpl/apache_ispconfig_fcgi_starter.master'
);
$content
=
str_replace
(
'{fastcgi_bin}'
,
$conf
[
'fastcgi'
][
'fastcgi_bin'
],
$content
);
$content
=
str_replace
(
'{fastcgi_phpini_path}'
,
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
],
$content
);
exec
(
'mkdir -p /var/www/php-fcgi-scripts/ispconfig'
);
wf
(
'/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
,
$content
);
exec
(
'chmod +x /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
);
exec
(
'ln -s /usr/local/ispconfig/interface/web /var/www/ispconfig'
);
exec
(
'chown -R ispconfig:ispconfig /var/www/php-fcgi-scripts/ispconfig'
);
}
}
}
...
...
install/dist/lib/gentoo.lib.php
View file @
526b997c
...
...
@@ -612,8 +612,12 @@ class installer extends installer_base
if
(
!
is_file
(
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps/.php-fcgi-starter'
)
)
{
$content
=
rf
(
'tpl/apache_apps_fcgi_starter.master'
);
$content
=
str_replace
(
'{fastcgi_bin}'
,
$conf
[
'fastcgi'
][
'fastcgi_bin'
],
$content
);
$content
=
str_replace
(
'{fastcgi_phpini_path}'
,
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
],
$content
);
mkdir
(
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps'
,
0755
,
true
);
copy
(
'tpl/apache_apps_fcgi_starter.master'
,
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps/.php-fcgi-starter'
);
//copy('tpl/apache_apps_fcgi_starter.master',$conf['web']['website_basedir'].'/php-fcgi-scripts/apps/.php-fcgi-starter');
wf
(
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps/.php-fcgi-starter'
,
$content
);
exec
(
'chmod +x '
.
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps/.php-fcgi-starter'
);
exec
(
'chown -R ispapps:ispapps '
.
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps'
);
...
...
@@ -938,13 +942,15 @@ class installer extends installer_base
$vhost_path
=
$conf
[
'apache'
][
'vhost_conf_dir'
]
.
'/ispconfig.vhost'
;
$this
->
write_config_file
(
$vhost_path
,
$content
);
if
(
!
is_file
(
'/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
))
{
if
(
!
is_file
(
'/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
))
{
$content
=
rf
(
'tpl/apache_ispconfig_fcgi_starter.master'
);
$content
=
str_replace
(
'{fastcgi_bin}'
,
$conf
[
'fastcgi'
][
'fastcgi_bin'
],
$content
);
$content
=
str_replace
(
'{fastcgi_phpini_path}'
,
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
],
$content
);
mkdir
(
'/var/www/php-fcgi-scripts/ispconfig'
,
0755
,
true
);
copy
(
'tpl/apache_ispconfig_fcgi_starter.master'
,
'/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
);
wf
(
'/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
,
$content
);
exec
(
'chmod +x /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
);
chmod
(
'/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
,
0755
);
symlink
(
$install_dir
.
'/interface/web'
,
'/var/www/ispconfig'
);
symlink
(
$install_dir
.
'/interface/web'
,
'/var/www/ispconfig'
);
exec
(
'chown -R ispconfig:ispconfig /var/www/php-fcgi-scripts/ispconfig'
);
}
}
...
...
install/dist/lib/opensuse.lib.php
View file @
526b997c
...
...
@@ -29,6 +29,79 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
class
installer_dist
extends
installer_base
{
public
function
configure_mailman
(
$status
=
'insert'
)
{
global
$conf
;
$config_dir
=
$conf
[
'mailman'
][
'config_dir'
]
.
'/'
;
$full_file_name
=
$config_dir
.
'mm_cfg.py'
;
//* Backup exiting file
if
(
is_file
(
$full_file_name
))
{
copy
(
$full_file_name
,
$config_dir
.
'mm_cfg.py~'
);
}
// load files
$content
=
rf
(
'tpl/mm_cfg.py.master'
);
$old_file
=
rf
(
$full_file_name
);
$old_options
=
array
();
$lines
=
explode
(
"
\n
"
,
$old_file
);
foreach
(
$lines
as
$line
)
{
if
(
trim
(
$line
)
!=
''
&&
substr
(
$line
,
0
,
1
)
!=
'#'
)
{
@
list
(
$key
,
$value
)
=
@
explode
(
"="
,
$line
);
if
(
!
empty
(
$value
))
{
$key
=
rtrim
(
$key
);
$old_options
[
$key
]
=
trim
(
$value
);
}
}
}
$config_dir
=
$conf
[
'mailman'
][
'config_dir'
]
.
'/'
;
$full_file_name
=
$config_dir
.
'virtual_to_transport.sh'
;
//* Backup exiting virtual_to_transport.sh script
if
(
is_file
(
$full_file_name
))
{
copy
(
$full_file_name
,
$config_dir
.
'virtual_to_transport.sh~'
);
}
copy
(
'tpl/mailman-virtual_to_transport.sh'
,
$full_file_name
);
chgrp
(
$full_file_name
,
'mailman'
);
chmod
(
$full_file_name
,
0750
);
if
(
!
is_file
(
'/var/lib/mailman/data/transport-mailman'
))
touch
(
'/var/lib/mailman/data/transport-mailman'
);
exec
(
'/usr/sbin/postmap /var/lib/mailman/data/transport-mailman'
);
exec
(
'/usr/lib/mailman/bin/genaliases 2>/dev/null'
);
$virtual_domains
=
''
;
if
(
$status
==
'update'
)
{
// create virtual_domains list
$domainAll
=
$this
->
db
->
queryAllRecords
(
"SELECT domain FROM mail_mailinglist GROUP BY domain"
);
if
(
is_array
(
$domainAll
))
{
foreach
(
$domainAll
as
$domain
)
{
if
(
$domainAll
[
0
][
'domain'
]
==
$domain
[
'domain'
])
$virtual_domains
.
=
"'"
.
$domain
[
'domain'
]
.
"'"
;
else
$virtual_domains
.
=
", '"
.
$domain
[
'domain'
]
.
"'"
;
}
}
}
else
$virtual_domains
=
"' '"
;
$content
=
str_replace
(
'{hostname}'
,
$conf
[
'hostname'
],
$content
);
if
(
!
isset
(
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
]))
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
]
=
''
;
$content
=
str_replace
(
'{default_language}'
,
$old_options
[
'DEFAULT_SERVER_LANGUAGE'
],
$content
);
$content
=
str_replace
(
'{virtual_domains}'
,
$virtual_domains
,
$content
);
wf
(
$full_file_name
,
$content
);
}
function
configure_postfix
(
$options
=
''
)
{
...
...
@@ -607,6 +680,24 @@ class installer_dist extends installer_base {
$command
=
'groupadd sshusers'
;
if
(
!
is_group
(
'sshusers'
))
caselog
(
$command
.
' &> /dev/null 2> /dev/null'
,
__FILE__
,
__LINE__
,
"EXECUTED:
$command
"
,
"Failed to execute the command
$command
"
);
// create PHP-FPM pool dir
exec
(
'mkdir -p '
.
$conf
[
'nginx'
][
'php_fpm_pool_dir'
]);
$content
=
rf
(
'/etc/php5/fpm/php-fpm.conf'
);
if
(
stripos
(
$content
,
'include=/etc/php5/fpm/pool.d/*.conf'
)
===
false
){
af
(
'/etc/php5/fpm/php-fpm.conf'
,
"
\n
include=/etc/php5/fpm/pool.d/*.conf"
);
}
unset
(
$content
);
if
(
!@
is_file
(
$conf
[
'nginx'
][
'php_fpm_ini_path'
])){
if
(
@
is_file
(
'/etc/php5/cli/php.ini'
)){
exec
(
'cp -f /etc/php5/cli/php.ini '
.
$conf
[
'nginx'
][
'php_fpm_ini_path'
]);
}
elseif
(
@
is_file
(
'/etc/php5/fastcgi/php.ini'
)){
exec
(
'cp -f /etc/php5/fastcgi/php.ini '
.
$conf
[
'nginx'
][
'php_fpm_ini_path'
]);
}
elseif
(
@
is_file
(
'/etc/php5/apache2/php.ini'
)){
exec
(
'cp -f /etc/php5/apache2/php.ini '
.
$conf
[
'nginx'
][
'php_fpm_ini_path'
]);
}
}
}
public
function
configure_nginx
(){
...
...
@@ -988,8 +1079,11 @@ class installer_dist extends installer_base {
wf
(
"
$vhost_conf_dir
/ispconfig.vhost"
,
$content
);
if
(
!
is_file
(
'/srv/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
))
{
$content
=
rf
(
'tpl/apache_ispconfig_fcgi_starter.master'
);
$content
=
str_replace
(
'{fastcgi_bin}'
,
$conf
[
'fastcgi'
][
'fastcgi_bin'
],
$content
);
$content
=
str_replace
(
'{fastcgi_phpini_path}'
,
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
],
$content
);
exec
(
'mkdir -p /srv/www/php-fcgi-scripts/ispconfig'
);
exec
(
'cp tpl/apache_ispconfig_fcgi_starter.master
/srv/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
);
wf
(
'
/srv/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
,
$content
);
exec
(
'chmod +x /srv/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
);
exec
(
'ln -s /usr/local/ispconfig/interface/web /srv/www/ispconfig'
);
exec
(
'chown -R ispconfig:ispconfig /srv/www/php-fcgi-scripts/ispconfig'
);
...
...
install/lib/installer_base.lib.php
View file @
526b997c
...
...
@@ -215,6 +215,7 @@ class installer_base {
$tpl_ini_array
[
'jailkit'
][
'jailkit_chroot_app_programs'
]
=
$conf
[
'jailkit'
][
'jailkit_chroot_app_programs'
];
$tpl_ini_array
[
'fastcgi'
][
'fastcgi_phpini_path'
]
=
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
];
$tpl_ini_array
[
'fastcgi'
][
'fastcgi_starter_path'
]
=
$conf
[
'fastcgi'
][
'fastcgi_starter_path'
];
$tpl_ini_array
[
'fastcgi'
][
'fastcgi_bin'
]
=
$conf
[
'fastcgi'
][
'fastcgi_bin'
];
$tpl_ini_array
[
'server'
][
'hostname'
]
=
$conf
[
'hostname'
];
$tpl_ini_array
[
'server'
][
'ip_address'
]
=
@
gethostbyname
(
$conf
[
'hostname'
]);
$tpl_ini_array
[
'web'
][
'website_basedir'
]
=
$conf
[
'web'
][
'website_basedir'
];
...
...
@@ -582,7 +583,7 @@ class installer_base {
if
(
!
is_file
(
'/var/lib/mailman/data/transport-mailman'
))
touch
(
'/var/lib/mailman/data/transport-mailman'
);
exec
(
'/usr/sbin/postmap /var/lib/mailman/data/transport-mailman'
);
exec
(
'/usr/lib/mailman/bin/genaliases'
);
exec
(
'/usr/lib/mailman/bin/genaliases
2>/dev/null
'
);
$virtual_domains
=
''
;
if
(
$status
==
'update'
)
...
...
@@ -1521,12 +1522,16 @@ class installer_base {
}
if
(
!
is_file
(
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps/.php-fcgi-starter'
))
{
$content
=
rf
(
'tpl/apache_apps_fcgi_starter.master'
);
$content
=
str_replace
(
'{fastcgi_bin}'
,
$conf
[
'fastcgi'
][
'fastcgi_bin'
],
$content
);
$content
=
str_replace
(
'{fastcgi_phpini_path}'
,
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
],
$content
);
mkdir
(
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps'
,
0755
,
true
);
copy
(
'tpl/apache_apps_fcgi_starter.master'
,
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps/.php-fcgi-starter'
);
//copy('tpl/apache_apps_fcgi_starter.master',$conf['web']['website_basedir'].'/php-fcgi-scripts/apps/.php-fcgi-starter');
wf
(
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps/.php-fcgi-starter'
,
$content
);
exec
(
'chmod +x '
.
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps/.php-fcgi-starter'
);
exec
(
'chown -R ispapps:ispapps '
.
$conf
[
'web'
][
'website_basedir'
]
.
'/php-fcgi-scripts/apps'
);
}
}
}
if
(
$conf
[
'nginx'
][
'installed'
]
==
true
){
$apps_vhost_user
=
escapeshellcmd
(
$conf
[
'web'
][
'apps_vhost_user'
]);
...
...
@@ -1917,12 +1922,14 @@ class installer_base {
}
}
if
(
!
is_file
(
'/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
))
{
$content
=
rf
(
'tpl/apache_ispconfig_fcgi_starter.master'
);
$content
=
str_replace
(
'{fastcgi_bin}'
,
$conf
[
'fastcgi'
][
'fastcgi_bin'
],
$content
);
$content
=
str_replace
(
'{fastcgi_phpini_path}'
,
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
],
$content
);
mkdir
(
'/var/www/php-fcgi-scripts/ispconfig'
,
0755
,
true
);
copy
(
'tpl/apache_ispconfig_fcgi_starter.master'
,
'/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
);
wf
(
'/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
,
$content
);
exec
(
'chmod +x /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter'
);
symlink
(
$install_dir
.
'/interface/web'
,
'/var/www/ispconfig'
);
exec
(
'chown -R ispconfig:ispconfig /var/www/php-fcgi-scripts/ispconfig'
);
}
}
...
...
install/lib/update.lib.php
View file @
526b997c
...
...
@@ -247,6 +247,7 @@ function updateDbAndIni() {
$tpl_ini_array
[
'jailkit'
][
'jailkit_chroot_app_programs'
]
=
$conf
[
'jailkit'
][
'jailkit_chroot_app_programs'
];
$tpl_ini_array
[
'fastcgi'
][
'fastcgi_phpini_path'
]
=
$conf
[
'fastcgi'
][
'fastcgi_phpini_path'
];
$tpl_ini_array
[
'fastcgi'
][
'fastcgi_starter_path'
]
=
$conf
[
'fastcgi'
][
'fastcgi_starter_path'
];
$tpl_ini_array
[
'fastcgi'
][
'fastcgi_bin'
]
=
$conf
[
'fastcgi'
][
'fastcgi_bin'
];
$tpl_ini_array
[
'server'
][
'hostname'
]
=
$conf
[
'hostname'
];
$tpl_ini_array
[
'server'
][
'ip_address'
]
=
@
gethostbyname
(
$conf
[
'hostname'
]);
$tpl_ini_array
[
'web'
][
'website_basedir'
]
=
$conf
[
'web'
][
'website_basedir'
];
...
...
install/sql/incremental/upd_0048.sql
0 → 100644
View file @
526b997c
ALTER
TABLE
`client`
CHANGE
`limit_aps`
`limit_aps`
INT
(
11
)
NOT
NULL
DEFAULT
'-1'
;
\ No newline at end of file
install/sql/ispconfig3.sql
View file @
526b997c
...
...
@@ -201,7 +201,7 @@ CREATE TABLE `client` (
`limit_shell_user`
int
(
11
)
NOT
NULL
DEFAULT
'0'
,
`ssh_chroot`
varchar
(
255
)
NOT
NULL
DEFAULT
'no,jailkit,ssh-chroot'
,
`limit_webdav_user`
int
(
11
)
NOT
NULL
DEFAULT
'0'
,
`limit_aps`
int
(
11
)
NOT
NULL
DEFAULT
'
0
'
,
`limit_aps`
int
(
11
)
NOT
NULL
DEFAULT
'
-1
'
,
`default_dnsserver`
int
(
11
)
unsigned
NOT
NULL
DEFAULT
'1'
,
`limit_dns_zone`
int
(
11
)
NOT
NULL
DEFAULT
'-1'
,
`limit_dns_slave_zone`
int
(
11
)
NOT
NULL
DEFAULT
'-1'
,
...
...
install/tpl/apache_apps_fcgi_starter.master
View file @
526b997c
#!/bin/sh
PHPRC
=
/etc/php5/cgi/
PHPRC
=
{
fastcgi_phpini_path
}
export
PHPRC
export
PHP_FCGI_MAX_REQUESTS
=
5000
export
PHP_FCGI_CHILDREN
=
1
exec
/usr/lib/cgi-bin/php
-d
magic_quotes_gpc
=
off
\ No newline at end of file
exec
{
fastcgi_bin
}
-d
magic_quotes_gpc
=
off
\ No newline at end of file
install/tpl/apache_ispconfig_fcgi_starter.master
View file @
526b997c
#!/bin/sh
PHPRC
=
/etc/php5/cgi/
PHPRC
=
{
fastcgi_phpini_path
}
export
PHPRC
export
PHP_FCGI_MAX_REQUESTS
=
5000
export
PHP_FCGI_CHILDREN
=
1
exec
/usr/bin/php-cgi
-d
magic_quotes_gpc
=
off
-d
session.save_path
=
/usr/local/ispconfig/server/temp
\ No newline at end of file
exec
{
fastcgi_bin
}
-d
magic_quotes_gpc
=
off
-d
session.save_path
=
/usr/local/ispconfig/server/temp
\ No newline at end of file
interface/lib/classes/aps_crawler.inc.php
View file @
526b997c
...
...
@@ -35,7 +35,7 @@ require_once('aps_base.inc.php');
class
ApsCrawler
extends
ApsBase
{
public
$app_download_url_list
=
array
();
//
public $app_download_url_list = array();
/**
* Constructor
...
...
@@ -98,7 +98,7 @@ class ApsCrawler extends ApsBase
forea