Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
94411b6a
Commit
94411b6a
authored
Apr 22, 2008
by
tbrehm
Browse files
- The Server ini is now loaded from a file templet
- Fixed a bug were DNS SOA records could not be deleted.
parent
430a0fa9
Changes
5
Hide whitespace changes
Inline
Side-by-side
install/install.php
View file @
94411b6a
...
...
@@ -124,6 +124,9 @@ if($install_mode == 'Standard') {
//* Create the mysql database
$inst
->
configure_database
();
//* Insert the Server record into the database
$inst
->
add_database_server_record
();
//* Configure postfix
$inst
->
configure_postfix
();
...
...
@@ -191,12 +194,16 @@ if($install_mode == 'Standard') {
}
else
{
//** Get Server ID
$conf
[
'server_id'
]
=
$inst
->
free_query
(
'Unique Numeric ID of the server'
,
'1'
);
// $conf['server_id'] = $inst->free_query('Unique Numeric ID of the server','1');
// Server ID is an autoInc value of the mysql database now
if
(
strtolower
(
$inst
->
simple_query
(
'Create Database'
,
array
(
'y'
,
'n'
),
'y'
))
==
'y'
)
{
//* Create the mysql database
$inst
->
configure_database
();
system
(
'/etc/init.d/mysql restart'
);
//* Insert the Server record into the database
$inst
->
add_database_server_record
();
}
if
(
strtolower
(
$inst
->
simple_query
(
'Configure Mail'
,
array
(
'y'
,
'n'
)
,
'y'
)
)
==
'y'
)
{
...
...
install/lib/installer_base.lib.php
View file @
94411b6a
...
...
@@ -153,6 +153,17 @@ class installer_base {
}
}
//** Create a recors in the
public
function
add_database_server_record
()
{
$server_ini
=
rf
(
"tpl/server.ini.master"
);
$server_ini
=
addslashes
(
$server_ini_content
);
$sql
=
"INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`) VALUES (1, 1, 'riud', 'riud', 'r', 'Server 1', 1, 1, 1, 1, 1, 1, '
$server_ini_content
', 0, 1);"
;
$this
->
db
->
query
(
$sql
);
$this
->
conf
[
'server_id'
]
=
$this
->
db
->
insertID
();
}
//** writes postfix configuration files
private
function
process_postfix_config
(
$configfile
)
...
...
install/sql/ispconfig3.sql
View file @
94411b6a
...
...
@@ -493,9 +493,6 @@ CREATE TABLE `server` (
-- Daten fr Tabelle `server`
--
INSERT
INTO
`server`
(
`server_id`
,
`sys_userid`
,
`sys_groupid`
,
`sys_perm_user`
,
`sys_perm_group`
,
`sys_perm_other`
,
`server_name`
,
`mail_server`
,
`web_server`
,
`dns_server`
,
`file_server`
,
`db_server`
,
`vserver_server`
,
`config`
,
`updated`
,
`active`
)
VALUES
(
1
,
1
,
1
,
'riud'
,
'riud'
,
'r'
,
'Server 1'
,
1
,
1
,
1
,
1
,
1
,
1
,
'[global]
\n
webserver=apache
\n
mailserver=postfix
\n
dnsserver=mydns
\n\n
[server]
\n
ip_address=192.168.0.105
\n
netmask=255.255.255.0
\n
gateway=192.168.0.1
\n
hostname=server1.example.com
\n
nameservers=193.174.32.18,145.253.2.75
\n\n
[mail]
\n
module=postfix_mysql
\n
maildir_path=/home/vmail/[domain]/[localpart]/
\n
homedir_path=/home/vmail/
\n
mailuser_uid=5000
\n
mailuser_gid=5000
\n
mailuser_name=vmail
\n
mailuser_group=vmail
\n
relayhost=
\n
relayhost_user=
\n
relayhost_password=
\n
mailbox_size_limit=0
\n
message_size_limit=0
\n\n
[getmail]
\n
getmail_config_dir=/etc/getmail
\n\n
[web]
\n
website_path=/var/clients/client[client_id]/web[website_id]
\n
website_symlinks=/var/www/[website_domain]/:/var/clients/client[client_id]/[website_domain]/
\n
vhost_conf_dir=/etc/apache2/sites-available
\n
vhost_conf_enabled_dir=/etc/apache2/sites-enabled
\n\n
'
,
0
,
1
);
-- --------------------------------------------------------
--
...
...
install/tpl/server.ini.master
0 → 100644
View file @
94411b6a
[global]
webserver=apache
mailserver=postfix
dnsserver=mydns
[server]
ip_address=192.168.0.105
netmask=255.255.255.0
gateway=192.168.0.1
hostname=server1.example.com
nameservers=193.174.32.18,145.253.2.75
[mail]
module=postfix_mysql
maildir_path=/home/vmail/[domain]/[localpart]/
homedir_path=/home/vmail/
mailuser_uid=5000
mailuser_gid=5000
mailuser_name=vmail
mailuser_group=vmail
relayhost=
relayhost_user=
relayhost_password=
mailbox_size_limit=0
message_size_limit=0
[getmail]
getmail_config_dir=/etc/getmail
[web]
website_path=/var/clients/client[client_id]/web[website_id]
website_symlinks=/var/www/[website_domain]/:/var/clients/client[client_id]/[website_domain]/
vhost_conf_dir=/etc/apache2/sites-available
vhost_conf_enabled_dir=/etc/apache2/sites-enabled
\ No newline at end of file
interface/web/dns/dns_soa_del.php
0 → 100644
View file @
94411b6a
<?php
/*
Copyright (c) 2008, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/******************************************
* Begin Form configuration
******************************************/
$list_def_file
=
"list/dns_soa.list.php"
;
$tform_def_file
=
"form/dns_soa.tform.php"
;
/******************************************
* End Form configuration
******************************************/
require_once
(
'../../lib/config.inc.php'
);
require_once
(
'../../lib/app.inc.php'
);
// Checke Berechtigungen für Modul
if
(
!
stristr
(
$_SESSION
[
"s"
][
"user"
][
"modules"
],
'dns'
))
{
header
(
"Location: ../index.php"
);
exit
;
}
$app
->
uses
(
"tform_actions"
);
$app
->
tform_actions
->
onDelete
();
?>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment