Skip to content

Commit 01d1205

Browse files
author
vogelor
committed
Added new Table for remote-actions to the installer
Set the user-rights for this table in the installer
1 parent cbff9d4 commit 01d1205

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

install/lib/installer_base.lib.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,14 @@ public function grant_master_database_rights()
333333
if(!$this->dbmaster->query($query)) {
334334
$this->error('Unable to create database user in master database: '.$conf['mysql']['master_ispconfig_user'].' Error: '.$this->dbmaster->errorMessage);
335335
}
336-
336+
337+
$query = "GRANT SELECT, UPDATE (`action_status`, `response`) ON ".$conf['mysql']['master_database'].".`sys_remoteaction` "
338+
."TO '".$conf['mysql']['master_ispconfig_user']."'@'".$src_host."' "
339+
."IDENTIFIED BY '".$conf['mysql']['master_ispconfig_password']."';";
340+
if(!$this->dbmaster->query($query)) {
341+
$this->error('Unable to create database user in master database: '.$conf['mysql']['master_ispconfig_user'].' Error: '.$this->dbmaster->errorMessage);
342+
}
343+
337344
$query = "GRANT SELECT, INSERT , DELETE ON ".$conf['mysql']['master_database'].".`monitor_data` "
338345
."TO '".$conf['mysql']['master_ispconfig_user']."'@'".$src_host."' "
339346
."IDENTIFIED BY '".$conf['mysql']['master_ispconfig_password']."';";

install/sql/ispconfig3.sql

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,22 @@ CREATE TABLE `sys_config` (
11481148
`value` varchar(255) NOT NULL
11491149
) ENGINE=MyISAM;
11501150

1151+
1152+
--
1153+
-- Tabellenstruktur für Tabelle `sys_remoteaction`
1154+
--
1155+
1156+
CREATE TABLE `sys_remoteaction` (
1157+
`action_id` int(11) unsigned NOT NULL auto_increment,
1158+
`server_id` int(11) unsigned NOT NULL,
1159+
`tstamp` int(11) NOT NULL,
1160+
`action_type` varchar(20) NOT NULL,
1161+
`action_param` mediumtext NOT NULL,
1162+
`action_status` enum('pending','ok','warning','error') NOT NULL,
1163+
`response` mediumtext NOT NULL,
1164+
PRIMARY KEY (`action_id`)
1165+
) ENGINE=MyISAM;
1166+
11511167
-- --------------------------------------------------------
11521168

11531169
--

0 commit comments

Comments
 (0)