Ignore:
Timestamp:
2011-11-09T20:48:57+01:00 (5 years ago)
Author:
nico
Message:

packages/nrpe: use new service functions, move user/group creation from postinst to initscript

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/admin/nrpe/files/nrpe.init

    r26051 r28888  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2007 OpenWrt.org 
     2# Copyright (C) 2007-2011 OpenWrt.org 
    33 
    44START=70 
    55 
     6SERVICE_USE_PID=1 
     7 
    68start() { 
    7         /usr/sbin/nrpe -c /etc/nrpe.cfg -d 
     9        user_exists nagios 50 || user_add nagios 50 
     10        group_exists nagios 50 || group_add nagios 50 
     11        [ -d /var/run/nagios ] || { 
     12                mkdir -m 0755 -p /var/run/nagios 
     13                chown nagios:nagios /var/run/nagios 
     14        } 
     15        service_start /usr/sbin/nrpe -c /etc/nrpe.cfg -d 
    816} 
    917 
    1018stop() { 
    11         killall nrpe 
     19        service_stop /usr/sbin/nrpe 
    1220} 
Note: See TracChangeset for help on using the changeset viewer.