aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/cron/cron.inc16
-rw-r--r--config/cron/cron.xml12
-rw-r--r--pkg_config.10.xml5
-rw-r--r--pkg_config.8.xml7
-rw-r--r--pkg_config.8.xml.amd647
5 files changed, 26 insertions, 21 deletions
diff --git a/config/cron/cron.inc b/config/cron/cron.inc
index 645575d9..87591e08 100644
--- a/config/cron/cron.inc
+++ b/config/cron/cron.inc
@@ -27,22 +27,30 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
+require_once("pfsense-utils.inc");
require_once("services.inc");
+require_once("util.inc");
function cron_sync_package() {
configure_cron();
// Previous package versions were "helpfully" killing cron on uninstall.
// Also, need to make sure cron is running, otherwise the package is useless.
- // TODO: Something like this needs to be eventually done in configure_cron() in services.inc.
- if (!is_process_running("cron")) {
- exec("cd /tmp && /usr/sbin/cron -s 2>/dev/null");
+ // configure_cron() function in services.inc already does this check on pfSense >=2.2.5
+ $pfs_version = str_replace(".", "", substr(trim(file_get_contents("/etc/version")), 0, 5));
+ if ($pfs_version < 225) {
+ if (!is_process_running("cron")) {
+ exec("cd /tmp && /usr/sbin/cron -s 2>/dev/null");
+ }
}
}
function cron_install_command() {
// Clean up possible lingering garbage after previous package versions
unlink_if_exists("/usr/local/etc/rc.d/cron.sh");
- cron_sync_package();
+}
+
+function cron_deinstall_command() {
+ rmdir_recursive("/usr/local/www/packages/cron");
}
?>
diff --git a/config/cron/cron.xml b/config/cron/cron.xml
index f777faff..181a4506 100644
--- a/config/cron/cron.xml
+++ b/config/cron/cron.xml
@@ -41,19 +41,16 @@
/* ====================================================================================== */
]]>
</copyright>
- <description>Cron</description>
- <name>Cron Settings</name>
- <version>0.3.1</version>
- <title>Settings</title>
+ <name>cronsettings</name>
+ <version>0.3.3</version>
+ <title>Cron Settings</title>
<include_file>/usr/local/pkg/cron.inc</include_file>
<menu>
<name>Cron</name>
- <tooltiptext>Cron settings.</tooltiptext>
<section>Services</section>
<configfile>cron.xml</configfile>
<url>/packages/cron/cron.php</url>
</menu>
- <configpath>installedpackages->package->$packagename->configuration->cron</configpath>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
<item>https://packages.pfsense.org/packages/config/cron/cron.xml</item>
@@ -87,4 +84,7 @@
<custom_php_install_command>
cron_install_command();
</custom_php_install_command>
+ <custom_php_deinstall_command>
+ cron_deinstall_command();
+ </custom_php_deinstall_command>
</packagegui>
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 1148c1e9..e7d92123 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -369,10 +369,9 @@
<descr>The cron utility is used to manage commands on a schedule.</descr>
<category>System</category>
<config_file>https://packages.pfsense.org/packages/config/cron/cron.xml</config_file>
- <version>0.3.2</version>
- <status>BETA</status>
+ <version>0.3.3</version>
+ <status>RC</status>
<required_version>2.2</required_version>
- <maintainer>markjcrane@gmail.com</maintainer>
<configurationfile>cron.xml</configurationfile>
</package>
<package>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index c15f5e08..fe97e998 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -436,10 +436,9 @@
<pkginfolink></pkginfolink>
<config_file>https://packages.pfsense.org/packages/config/cron/cron.xml</config_file>
<depends_on_package_base_url>https://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
- <version>0.3.2</version>
- <status>Beta</status>
- <required_version>1.2</required_version>
- <maintainer>markjcrane@gmail.com</maintainer>
+ <version>0.3.3</version>
+ <status>RC</status>
+ <required_version>2.1</required_version>
<configurationfile>cron.xml</configurationfile>
</package>
<package>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 7057ad4f..6815c981 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -423,10 +423,9 @@
<pkginfolink></pkginfolink>
<config_file>https://packages.pfsense.org/packages/config/cron/cron.xml</config_file>
<depends_on_package_base_url>https://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url>
- <version>0.3.2</version>
- <status>Beta</status>
- <required_version>1.2</required_version>
- <maintainer>markjcrane@gmail.com</maintainer>
+ <version>0.3.3</version>
+ <status>RC</status>
+ <required_version>2.1</required_version>
<configurationfile>cron.xml</configurationfile>
</package>
<package>