diff --git a/APACHE/CrontabTaks.conf b/APACHE/CrontabTaks.conf deleted file mode 100644 index eef542e..0000000 --- a/APACHE/CrontabTaks.conf +++ /dev/null @@ -1 +0,0 @@ -PerlModule Apache::Ocsinventory::Plugins::CrontabTasks::Map diff --git a/APACHE/Map.pm b/APACHE/Map.pm index 20ff452..ccacbfa 100644 --- a/APACHE/Map.pm +++ b/APACHE/Map.pm @@ -1,9 +1,9 @@ - -package Apache::Ocsinventory::Plugins::CrontabTasks::Map; - + +package Apache::Ocsinventory::Plugins::Crontabtasks::Map; + use strict; - + use Apache::Ocsinventory::Map; $DATA_MAP{crontabtasks} = { @@ -25,4 +25,3 @@ $DATA_MAP{crontabtasks} = { } }; 1; - diff --git a/APACHE/crontabtasks.conf b/APACHE/crontabtasks.conf new file mode 100644 index 0000000..90dd939 --- /dev/null +++ b/APACHE/crontabtasks.conf @@ -0,0 +1 @@ +PerlModule Apache::Ocsinventory::Plugins::Crontabtasks::Map diff --git a/hook.xml b/hook.xml new file mode 100644 index 0000000..1e30720 --- /dev/null +++ b/hook.xml @@ -0,0 +1,13 @@ + + + + en_GB + fr_FR + + + cd_crontabtasks + 24000 + config + crontabtasks + + diff --git a/infos.json b/infos.json index 8fef059..ba43e49 100644 --- a/infos.json +++ b/infos.json @@ -3,6 +3,8 @@ "author" : ["Guillaume PROTET", "Valentin DEVILLE"], "contributor" : ["Frank BOURDEAU"], "supportedAgent" : ["Unix"], + "version" : "2.0", + "licence" : "GPLv2", "description" : { "fr" : "Remonte les crontab", "en" : "Retrieve crontab tasks" diff --git a/install.php b/install.php index ab948c3..7592a94 100644 --- a/install.php +++ b/install.php @@ -1,38 +1,39 @@ 'crontabTasks', -'version' => '1.1', -'author'=> 'Guillaume PROTET, Valentin DEVILLE', -'license' => 'GPLv2', -'verMinOcs' => '2.2'); -} -function plugin_init_crontabTasks() +/** + * This function is called on installation and is used to create database schema for the plugin + */ +function extension_install_crontabtasks() { -$object = new plugins; -$object -> add_cd_entry("crontabtasks","config"); + $commonObject = new ExtensionCommon; -$object -> sql_query("CREATE TABLE IF NOT EXISTS `crontabtasks` ( - `ID` INT(11) NOT NULL AUTO_INCREMENT, - `HARDWARE_ID` INT(11) NOT NULL, - `USER` varchar(255) DEFAULT NULL, - `CRON` varchar(255) DEFAULT NULL, - `MINUTE` varchar(3) DEFAULT NULL, - `HOUR` varchar(2) DEFAULT NULL, - `DOM` varchar(1) DEFAULT NULL, - `MONTH` varchar(1) DEFAULT NULL, - `DOW` varchar(1) DEFAULT NULL, - PRIMARY KEY (`ID`,`HARDWARE_ID`) - ) ENGINE=INNODB;" -); + $commonObject -> sqlQuery("CREATE TABLE IF NOT EXISTS `crontabtasks` ( + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `HARDWARE_ID` INT(11) NOT NULL, + `USER` varchar(255) DEFAULT NULL, + `CRON` varchar(255) DEFAULT NULL, + `MINUTE` varchar(3) DEFAULT NULL, + `HOUR` varchar(2) DEFAULT NULL, + `DOM` varchar(1) DEFAULT NULL, + `MONTH` varchar(1) DEFAULT NULL, + `DOW` varchar(1) DEFAULT NULL, + PRIMARY KEY (`ID`,`HARDWARE_ID`) + ) ENGINE=INNODB;"); +} +/** + * This function is called on removal and is used to destroy database schema for the plugin + */ +function extension_delete_crontabtasks() +{ + $commonObject = new ExtensionCommon; + $commonObject -> sqlQuery("DROP TABLE `crontabtasks`"); } -function plugin_delete_crontabTasks() +/** + * This function is called on plugin upgrade + */ +function extension_upgrade_crontabtasks() { -$object = new plugins; -$object -> del_cd_entry("crontabtasks"); -$object -> sql_query("DROP TABLE `crontabtasks`"); } diff --git a/language/en_GB/en_GB.txt b/language/en_GB/en_GB.txt new file mode 100644 index 0000000..0d83fa6 --- /dev/null +++ b/language/en_GB/en_GB.txt @@ -0,0 +1 @@ +24000 Crontab Tasks diff --git a/language/fr_FR/fr_FR.txt b/language/fr_FR/fr_FR.txt new file mode 100644 index 0000000..0d83fa6 --- /dev/null +++ b/language/fr_FR/fr_FR.txt @@ -0,0 +1 @@ +24000 Crontab Tasks