diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-11-15 11:02:29 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-11-15 11:02:29 +0000 |
commit | bdc1852a1e2ab84354e0eb6d628b7d7cdf865d58 (patch) | |
tree | 74599fc9e6ecf302d3f4bd994dc5856844cbab24 /misc/init.d/tru64 | |
parent | 45a36c3276b670e687c4340c5031f1bc8d2ee17a (diff) | |
download | zabbix-bdc1852a1e2ab84354e0eb6d628b7d7cdf865d58.tar.gz zabbix-bdc1852a1e2ab84354e0eb6d628b7d7cdf865d58.tar.xz zabbix-bdc1852a1e2ab84354e0eb6d628b7d7cdf865d58.zip |
- startup script for Tru64 (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@2319 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'misc/init.d/tru64')
-rw-r--r-- | misc/init.d/tru64/zabbix_agentd | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/misc/init.d/tru64/zabbix_agentd b/misc/init.d/tru64/zabbix_agentd new file mode 100644 index 00000000..ae0da251 --- /dev/null +++ b/misc/init.d/tru64/zabbix_agentd @@ -0,0 +1,56 @@ +#!/bin/sh + +# ZABBIX +# Copyright (C) 2000-2005 SIA Zabbix +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# Start/Stop the secure shell daemon. +# Place a startup script in /sbin/init.d, and link to it from /sbin/rc[023].d + +SERVICE="ZABBIX agent" +DAEMON=/usr/local/bin/zabbix_agentd +PIDFILE=/tmp/zabbix_agentd.pid + +case $1 in + 'start') + if [ -x ${DAEMON} ] + then + $DAEMON + # Error checking here would be good... + echo "${SERVICE} started." + else + echo "Can't find file ${DAEMON}." + echo "${SERVICE} NOT started." + fi + ;; + 'stop') + if [ -s ${PIDFILE} ] + then + if kill `cat ${PIDFILE}` >/dev/null 2>&1 + then + echo "${SERVICE} terminated." + rm -f ${PIDFILE} + fi + fi + ;; + 'restart') + $0 stop + $0 start + ;; + *) + echo "Usage: $0 start|stop|restart" + ;; +esac |