packages/admin/nrpe/files/nrpe.init
nico bb682f1ed3 packages/nrpe: use new service functions, move user/group creation from postinst to initscript
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28888 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-09 19:48:57 +00:00

21 lines
393 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2007-2011 OpenWrt.org
START=70
SERVICE_USE_PID=1
start() {
user_exists nagios 50 || user_add nagios 50
group_exists nagios 50 || group_add nagios 50
[ -d /var/run/nagios ] || {
mkdir -m 0755 -p /var/run/nagios
chown nagios:nagios /var/run/nagios
}
service_start /usr/sbin/nrpe -c /etc/nrpe.cfg -d
}
stop() {
service_stop /usr/sbin/nrpe
}