aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-04-24 13:45:44 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-04-24 13:45:44 -0300
commitab017846b37a5fb036609cda32ae5e2334410f11 (patch)
tree5d8edeabe02526fae766b0d64dac9db44ae40f18
parent4a8a13b781a72d3ed3ad9328b830be535041633b (diff)
downloadpfsense-packages-ab017846b37a5fb036609cda32ae5e2334410f11.tar.gz
pfsense-packages-ab017846b37a5fb036609cda32ae5e2334410f11.tar.bz2
pfsense-packages-ab017846b37a5fb036609cda32ae5e2334410f11.zip
Remove ugly copy files around and use additional_files_needed to install files in proper place. Bump package version
-rw-r--r--config/cron/cron.inc23
-rw-r--r--config/cron/cron.php (renamed from config/cron/cron.tmp)0
-rw-r--r--config/cron/cron.xml8
-rw-r--r--config/cron/cron_edit.php (renamed from config/cron/cron_edit.tmp)0
-rw-r--r--pkg_config.10.xml2
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
7 files changed, 11 insertions, 26 deletions
diff --git a/config/cron/cron.inc b/config/cron/cron.inc
index 2fe9cf57..a457f013 100644
--- a/config/cron/cron.inc
+++ b/config/cron/cron.inc
@@ -54,10 +54,8 @@ function cron_sync_package()
global $config;
//synch cron tab
configure_cron();
- $handle = popen("/usr/local/etc/rc.d/cron.sh stop", "r");
- pclose($handle);
- $handle = popen("/usr/local/etc/rc.d/cron.sh start", "r");
- pclose($handle);
+ exec("/usr/local/etc/rc.d/cron.sh stop");
+ exec("/usr/local/etc/rc.d/cron.sh start");
}
@@ -69,14 +67,6 @@ function cron_install_command()
conf_mount_rw();
config_lock();
- if (!is_dir('/usr/local/www/packages/cron/')) {
- exec("mkdir -p /usr/local/www/packages/cron/");
- }
-
- //Copy PHP files from .tmp to .php - don't move or put them in /tmp or the pkg system will miss them if it gets cleared.
- exec("cp /usr/local/pkg/cron.tmp /usr/local/www/packages/cron/cron.php");
- exec("cp /usr/local/pkg/cron_edit.tmp /usr/local/www/packages/cron/cron_edit.php");
-
//write_config();
write_rcfile(array(
@@ -101,14 +91,9 @@ function cron_install_command()
function cron_deinstall_command()
{
conf_mount_rw();
- config_lock();
- $handle = popen("/usr/local/etc/rc.d/cron.sh stop", "r");
- unlink_if_exists("/usr/local/pkg/cron.xml");
- unlink_if_exists("/usr/local/www/cron.inc");
- exec("rm -R /usr/local/www/packages/cron");
- //unlink_if_exists("/usr/local/etc/rc.d/cron.sh");
+ exec("/usr/local/etc/rc.d/cron.sh stop");
+ unlink_if_exists("/usr/local/etc/rc.d/cron.sh");
conf_mount_ro();
- config_unlock();
}
?>
diff --git a/config/cron/cron.tmp b/config/cron/cron.php
index b9666e01..b9666e01 100644
--- a/config/cron/cron.tmp
+++ b/config/cron/cron.php
diff --git a/config/cron/cron.xml b/config/cron/cron.xml
index 3376d9e0..7ca50084 100644
--- a/config/cron/cron.xml
+++ b/config/cron/cron.xml
@@ -76,14 +76,14 @@
<item>https://packages.pfsense.org/packages/config/cron/cron.inc</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
+ <prefix>/usr/local/packages/cron/</prefix>
<chmod>0755</chmod>
- <item>https://packages.pfsense.org/packages/config/cron/cron.tmp</item>
+ <item>https://packages.pfsense.org/packages/config/cron/cron.php</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
+ <prefix>/usr/local/packages/cron/</prefix>
<chmod>0755</chmod>
- <item>https://packages.pfsense.org/packages/config/cron/cron_edit.tmp</item>
+ <item>https://packages.pfsense.org/packages/config/cron/cron_edit.php</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/packages/cron/</prefix>
diff --git a/config/cron/cron_edit.tmp b/config/cron/cron_edit.php
index 12fde39d..12fde39d 100644
--- a/config/cron/cron_edit.tmp
+++ b/config/cron/cron_edit.php
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 57c7848c..39a42497 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -360,7 +360,7 @@
<category>Services</category>
<pkginfolink></pkginfolink>
<config_file>https://packages.pfsense.org/packages/config/cron/cron.xml</config_file>
- <version>0.1.8</version>
+ <version>0.1.9</version>
<status>Beta</status>
<required_version>2.2</required_version>
<maintainer>markjcrane@gmail.com</maintainer>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 1ec3a826..0f329094 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -459,7 +459,7 @@
<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.1.8</version>
+ <version>0.1.9</version>
<status>Beta</status>
<required_version>1.2</required_version>
<maintainer>markjcrane@gmail.com</maintainer>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index f04ce07c..9a995679 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -446,7 +446,7 @@
<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.1.8</version>
+ <version>0.1.9</version>
<status>Beta</status>
<required_version>1.2</required_version>
<maintainer>markjcrane@gmail.com</maintainer>