merging mysql.sql from alan

This commit is contained in:
Benjamin Sonntag 2014-03-27 17:56:37 +01:00
commit b6462b87c7
6 changed files with 9 additions and 71 deletions

1
.gitattributes vendored
View File

@ -653,7 +653,6 @@ src/generate_apache_conf.php -text
src/generate_bind_conf.php -text
src/inotify_do_actions.sh -text
src/inotify_update_domains.sh -text
src/lxc_stopexpired.php -text
src/mail_dodelete.php -text
src/mem_add -text
src/mem_del -text

View File

@ -214,4 +214,12 @@ if ($oldid && $oldid!=$cuid) {
$isinvited=true;
}
// Init some vars
variable_get('hosting_tld', '','This is a FQDN that designates the main hostname of the service. For example, hosting_tld determines in what TLD the "free" user domain is created. If this is set to "example.com", a checkbox will appear in the user creation dialog requesting the creator if he wants to create the domain "username.example.com".', array(array('desc'=>'Wanted FQDN','type'=>'string')));
variable_get('subadmin_restriction', '0', "This variable set the way the account list works for accounts other than 'admin' (2000). 0 (default) = admin other than admin/2000 can see their own account, but not the other one 1 = admin other than admin/2000 can see any account by clicking the ''show all accounts'' link.", array(array('desc'=>'Shared access activated?','type'=>'boolean')));
variable_get('auth_ip_ftp_default_yes', '1', "This variable set if you want to allow all IP address to access FTP by default. If the user start to define some IP or subnet in the allow list, only those he defined will be allowed.", array(array('desc'=>'Allow by default?','type'=>'boolean')));
?>

View File

@ -169,7 +169,7 @@ class m_variables {
// Replace needed vars
foreach ($variables as $vv => $hh) {
if (!isset($hh['value'])) {
if (!isset($hh['value']) || !empty($hh['value'])) {
continue;
}
$variables[$vv]['value'] = strtr($hh['value'], $this->replace_array );

View File

@ -34,5 +34,3 @@
# Every 20 minutes, do actions
00,20 * * * * root /usr/lib/alternc/do_actions.php
# Every hour, stop expired VMs
10 * * * * alterncpanel /usr/lib/alternc/lxc_stopexpired.php

View File

@ -398,17 +398,6 @@ CREATE TABLE `variable` (
KEY `name` (`name`)
) ENGINE=MyISAM;
-- hosting_tld: only used, for now, in bureau/admin/adm_*add.php
INSERT IGNORE INTO `variable` (name, value, comment) VALUES ('hosting_tld', 0,
'This is a FQDN that designates the main hostname of the service.
For example, hosting_tld determines in what TLD the "free" user domain
is created. If this is set to "example.com", a checkbox will appear in
the user creation dialog requesting the creator if he wants to create
the domain "username.example.com".
If this is set to 0 or a "false" string, it will be ignored.');
--
-- Table structure for table `dbusers`
--
@ -471,13 +460,6 @@ CREATE TABLE IF NOT EXISTS `policy` (
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='The password policies for services';
INSERT IGNORE INTO `variable` (`name` ,`value` ,`comment`)
VALUES (
'subadmin_restriction', '',
'This variable set the way the account list works for accounts other than "admin" (2000). 0 (default) = admin other than admin/2000 can see their own account, but not the other one 1 = admin other than admin/2000 can see any account by clicking the ''show all accounts'' link. '
);
-- Domains type
CREATE TABLE IF NOT EXISTS `domaines_type` (
`name` VARCHAR (30) NOT NULL, -- Uniq name
@ -585,13 +567,6 @@ CREATE TABLE IF NOT EXISTS `authorised_ip_affected` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM COMMENT='Table with list of protocol <-> authorised ip and subnet';
INSERT IGNORE INTO `variable` (`name` ,`value` ,`comment`)
VALUES (
'auth_ip_ftp_default_yes', '1',
'This variable set if you want to allow all IP address to access FTP by default. If the user start to define some IP or subnet in the allow list, only those he defined will be allowed. This variable can take two value : 0 or 1.'
);
--
-- Structure de la table `cron`
--
@ -764,7 +739,6 @@ CREATE TABLE IF NOT EXISTS `actions` (
PRIMARY KEY ( `id` )
) ENGINE=MyISAM COMMENT = 'generic actions';
-- version control now in MySQL
CREATE TABLE IF NOT EXISTS `alternc_status` (
`name` varchar(48) NOT NULL DEFAULT '',
@ -774,4 +748,3 @@ CREATE TABLE IF NOT EXISTS `alternc_status` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO alternc_status SET name='alternc_version',value='3.1.0~b.php';

View File

@ -1,40 +0,0 @@
#!/usr/bin/php -q
<?php
/*
$Id: do_actions.php,v 1.0 2013/04/19 13:40:32 axel Exp $
----------------------------------------------------------------------
AlternC - Web Hosting System
Copyright (C) 2002 by the AlternC Development Team.
http://alternc.org/
----------------------------------------------------------------------
Based on:
Valentin Lacambre's web hosting softwares: http://altern.org/
----------------------------------------------------------------------
LICENSE
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License (GPL)
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To read the license please visit http://www.gnu.org/copyleft/gpl.html
----------------------------------------------------------------------
Original Author of file: Alan Garcia
Purpose of file: Shutdown expired VMs
----------------------------------------------------------------------
*/
require_once("/usr/share/alternc/panel/class/config_nochk.php");
$admin->stop_if_jobs_locked();
# Be super user
#$mem->setid(2000);
$admin->enabled=1;
# Stop expired vms
$lxc->stop_expired();