-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from PluginsOCSInventory-NG/rework
Rework
- Loading branch information
Showing
8 changed files
with
51 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PerlModule Apache::Ocsinventory::Plugins::Crontabtasks::Map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<hookstore> | ||
<hook type="lang"> | ||
<value>en_GB</value> | ||
<value>fr_FR</value> | ||
</hook> | ||
<hook type="cdentry"> | ||
<identifier>cd_crontabtasks</identifier> | ||
<translation>24000</translation> | ||
<category>config</category> | ||
<available>crontabtasks</available> | ||
</hook> | ||
</hookstore> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,39 @@ | ||
<?php | ||
function plugin_version_crontabTasks() | ||
{ | ||
return array('name' => '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`"); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
24000 Crontab Tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
24000 Crontab Tasks |