diff options
author | Remco Verhoef <remcoverhoef@pfsense.org> | 2008-05-12 20:15:52 +0000 |
---|---|---|
committer | Remco Verhoef <remcoverhoef@pfsense.org> | 2008-05-12 20:15:52 +0000 |
commit | fe39614102eb6589ac222a78f34d58e1dfb760f2 (patch) | |
tree | 497a1eddccfe36b727506b5e26905755eeaa9169 /packages | |
parent | 8f189a4d0ee95315cf4dfdf40f0d748ceec3be4c (diff) | |
download | pfsense-packages-fe39614102eb6589ac222a78f34d58e1dfb760f2.tar.gz pfsense-packages-fe39614102eb6589ac222a78f34d58e1dfb760f2.tar.bz2 pfsense-packages-fe39614102eb6589ac222a78f34d58e1dfb760f2.zip |
Updated start, stop and restart scripts.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/zabbix-agent.xml | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/packages/zabbix-agent.xml b/packages/zabbix-agent.xml index ee1a7e34..3c3373da 100644 --- a/packages/zabbix-agent.xml +++ b/packages/zabbix-agent.xml @@ -79,37 +79,30 @@ exec("/bin/rm -f /usr/local/etc/rc.d/zabbix_agentd"); - $start = "/bin/mkdir -p /var/log/zabbix;"; - $start .= "/usr/sbin/chown -R zabbix:zabbix /var/log/zabbix;"; + $start = "/bin/mkdir -p /var/log/zabbix\n"; + $start .= "/usr/sbin/chown -R zabbix:zabbix /var/log/zabbix\n"; - $start .= "/bin/mkdir -p /var/run/zabbix;"; - $start .= "/usr/sbin/chown -R zabbix:zabbix /var/run/zabbix;"; + $start .= "/bin/mkdir -p /var/run/zabbix\n"; + $start .= "/usr/sbin/chown -R zabbix:zabbix /var/run/zabbix\n"; - /* start snort */ - $start .= "/usr/local/bin/zabbix_agentd;"; + $start .= "echo \"Starting Zabbix Agent\"...\n"; + + /* start zabbix agent */ + $start .= "/usr/local/bin/zabbix_agentd\n"; + + $stop = "echo \"Stopping Zabbix Agent\"\n"; + $stop .= "/usr/bin/killall zabbix_agentd\n" /* write out rc.d start/stop file */ write_rcfile(array( "file" => "zabbix_agentd.sh", "start" => "{$start}", - "restart" => "/usr/bin/killall zabbix_agentd; {$start};", - "stop" => "/usr/bin/killall zabbix_agentd;" + "restart" => "$stop\nsleep 5\n{$start}", + "stop" => "$stop" ) ); - $conf = "Server=127.0.0.1\n"; - $conf .= "StartAgents=5\n"; - $conf .= "DebugLevel=3\n"; - $conf .= "PidFile=/var/run/zabbix/zabbix_agentd.pid\n"; - $conf .= "LogFile=/var/log/zabbix/zabbix_agentd.log\n"; - $conf .= "LogFileSize=1\n"; - $conf .= "Timeout=3\n"; - - file_put_contents("/usr/local/etc/zabbix/zabbix_agentd.conf", $conf); - conf_mount_ro(); - - start_service("zabbix_agentd"); ]]> </custom_php_install_command> <custom_php_command_before_form></custom_php_command_before_form> @@ -144,8 +137,8 @@ $conf = "Server=$Server\n"; $conf .= "ServerPort=$ServerPort\n"; $conf .= "Hostname=$Hostname\n"; + $conf .= "ListenIP=0.0.0.0\n"; $conf .= "ListenPort=$ListenPort\n"; - $conf .= "Hostname=$Hostname\n"; $conf .= "StartAgents=5\n"; $conf .= "DebugLevel=3\n"; $conf .= "PidFile=/var/run/zabbix/zabbix_agentd.pid\n"; |