aboutsummaryrefslogtreecommitdiffstats
path: root/config/cron
diff options
context:
space:
mode:
Diffstat (limited to 'config/cron')
-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
4 files changed, 8 insertions, 23 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