aboutsummaryrefslogtreecommitdiffstats
path: root/config/widentd
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-08-06 22:46:06 +0200
committerdoktornotor <notordoktor@gmail.com>2015-08-06 22:46:06 +0200
commited65780f737a9fa2f225d3664c4e8f7367b7cebe (patch)
tree977abc05df11d227af716901fe81a2d6a95cdeff /config/widentd
parent42165ca9812cb69508c8a8bb052b5d459a7d3a13 (diff)
downloadpfsense-packages-ed65780f737a9fa2f225d3664c4e8f7367b7cebe.tar.gz
pfsense-packages-ed65780f737a9fa2f225d3664c4e8f7367b7cebe.tar.bz2
pfsense-packages-ed65780f737a9fa2f225d3664c4e8f7367b7cebe.zip
widentd.xml - add enable/disable feature
Diffstat (limited to 'config/widentd')
-rw-r--r--config/widentd/widentd.xml15
1 files changed, 14 insertions, 1 deletions
diff --git a/config/widentd/widentd.xml b/config/widentd/widentd.xml
index b0c12b72..27a8ffe8 100644
--- a/config/widentd/widentd.xml
+++ b/config/widentd/widentd.xml
@@ -58,6 +58,11 @@
<configpath>installedpackages->package->$packagename->configuration->settings</configpath>
<fields>
<field>
+ <fielddescr>Enable widentd daemon</fielddescr>
+ <fieldname>enable</fieldname>
+ <type>checkbox</type>
+ </field>
+ <field>
<fielddescr>Listening interface</fielddescr>
<fieldname>interface</fieldname>
<description>
@@ -114,7 +119,15 @@
)
);
- restart_service("widentd");
+ /* If the service is (being) disabled, stop it (if running) and do nothing else */
+ if (!($config['installedpackages']['widentd']['config'][0][enable])) {
+ if (is_process_running("widentd")) {
+ stop_service("widentd");
+ }
+ return;
+ } else {
+ restart_service("widentd");
+ }
config_unlock();
conf_mount_ro();
}