From 0b2c3440efef324c771681bbd32d7c6b73c0a9fe Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 28 Aug 2013 00:45:23 -0400 Subject: Rename to avoid potential confusion with existing utility. --- config/procwatch/procwatch.inc | 39 ----- config/procwatch/procwatch.xml | 72 ---------- config/procwatch/procwatch_cron.php | 6 - config/procwatch/services_procwatch.php | 211 ---------------------------- config/procwatch/services_procwatch_add.php | 115 --------------- 5 files changed, 443 deletions(-) delete mode 100644 config/procwatch/procwatch.inc delete mode 100644 config/procwatch/procwatch.xml delete mode 100644 config/procwatch/procwatch_cron.php delete mode 100644 config/procwatch/services_procwatch.php delete mode 100644 config/procwatch/services_procwatch_add.php (limited to 'config/procwatch') diff --git a/config/procwatch/procwatch.inc b/config/procwatch/procwatch.inc deleted file mode 100644 index b2210e03..00000000 --- a/config/procwatch/procwatch.inc +++ /dev/null @@ -1,39 +0,0 @@ - 0) { - // Add the cron job if it doesn't exist. - install_cron_job("/usr/local/pkg/procwatch_cron.php", true, "*/1"); - } else { - // Remove the cron job - install_cron_job("/usr/local/pkg/procwatch_cron.php", false, "*/1"); - } -} - -function procwatch_check_services() { - global $config; - if (!is_array($config['installedpackages']['procwatch']['item'])) { - $config['installedpackages']['procwatch']['item'] = array(); - } - $a_pwservices = &$config['installedpackages']['procwatch']['item']; - - foreach ($a_pwservices as $svc) { - if (!is_service_running($svc['name'])) { - $descr = strlen($svc['description']) > 50 ? substr($svc['description'], 0, 50) . "..." : $svc['description']; - log_error("ProcWatch detected service {$svc['name']} stopped. Restarting {$svc['name']} ({$descr})"); - service_control_start($svc['name'], $svc); - } - } -} - -?> \ No newline at end of file diff --git a/config/procwatch/procwatch.xml b/config/procwatch/procwatch.xml deleted file mode 100644 index 9db6d40d..00000000 --- a/config/procwatch/procwatch.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - ProcWatch - None - Monitors for stopped services and restarts them. - ProcWatch - 1.0 - Services: Procwatch - /usr/local/pkg/procwatch.inc - - ProcWatch - -
Services
- /services_procwatch.php -
- - /usr/local/www/ - 644 - http://www.pfsense.com/packages/config/procwatch/services_procwatch.php - - - /usr/local/www/ - 644 - http://www.pfsense.com/packages/config/procwatch/services_procwatch_add.php - - - /usr/local/pkg/ - 755 - http://www.pfsense.com/packages/config/procwatch/procwatch_cron.php - - - /usr/local/pkg/ - 644 - http://www.pfsense.com/packages/config/procwatch/procwatch.inc - -
\ No newline at end of file diff --git a/config/procwatch/procwatch_cron.php b/config/procwatch/procwatch_cron.php deleted file mode 100644 index f4cc7608..00000000 --- a/config/procwatch/procwatch_cron.php +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/local/bin/php -f - \ No newline at end of file diff --git a/config/procwatch/services_procwatch.php b/config/procwatch/services_procwatch.php deleted file mode 100644 index c8a16b07..00000000 --- a/config/procwatch/services_procwatch.php +++ /dev/null @@ -1,211 +0,0 @@ - $pd) { - if (preg_match("/move_(\d+)_x/", $pn, $matches)) { - $movebtn = $matches[1]; - break; - } - } - /* move selected services before this service */ - if (isset($movebtn) && is_array($_POST['pwservices']) && count($_POST['pwservices'])) { - $a_pwservices_new = array(); - - /* copy all services < $movebtn and not selected */ - for ($i = 0; $i < $movebtn; $i++) { - if (!in_array($i, $_POST['pwservices'])) - $a_pwservices_new[] = $a_pwservices[$i]; - } - - /* copy all selected services */ - for ($i = 0; $i < count($a_pwservices); $i++) { - if ($i == $movebtn) - continue; - if (in_array($i, $_POST['pwservices'])) - $a_pwservices_new[] = $a_pwservices[$i]; - } - - /* copy $movebtn service */ - if ($movebtn < count($a_pwservices)) - $a_pwservices_new[] = $a_pwservices[$movebtn]; - - /* copy all services > $movebtn and not selected */ - for ($i = $movebtn+1; $i < count($a_pwservices); $i++) { - if (!in_array($i, $_POST['pwservices'])) - $a_pwservices_new[] = $a_pwservices[$i]; - } - $a_pwservices = $a_pwservices_new; - procwatch_cron_job(); - write_config(); - header("Location: services_procwatch.php"); - return; - } -} - -$closehead = false; -$pgtitle = array(gettext("Services"),gettext("ProcWatch")); -include("head.inc"); - -?> - - - - - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - -
- -

-
  - - - - -
- - " border="0" alt="delete" /> - - " onclick="return confirm('')" /> - - " alt="add" />
-
- - - - - - - - - -
" height="17" type="image" width="17" border="0" />')">" alt="delete" />
-
- - - - - - - - -
" border="0" alt="move" />" border="0" alt="move" />
- - " border="0" alt="delete" /> - - " onclick="return confirm('')" /> - - " alt="add" />
-
- -
-
-
- - - diff --git a/config/procwatch/services_procwatch_add.php b/config/procwatch/services_procwatch_add.php deleted file mode 100644 index 457a93a4..00000000 --- a/config/procwatch/services_procwatch_add.php +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - -
- - - - - - - - - - - - -
- -
  - " /> " onclick="history.back()" /> -
-
- - - -- cgit v1.2.3