source: packages/net/olsrd/files/olsrd.init @ 6609

Last change on this file since 6609 was 6609, checked in by florian, 10 years ago

Fix pid writing with olsrd (#1480)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 340 bytes
Line 
1#!/bin/sh /etc/rc.common
2# Copyright (C) 2006 OpenWrt.org
3
4BIN=olsrd
5DEFAULT=/etc/default/olsrd
6RUN_D=/var/run
7PID_F=$RUN_D/$BIN.pid
8
9start() {
10        [ -f $DEFAULT ] && . $DEFAULT
11        $BIN -nofork $OPTIONS &
12       
13        # write pid file (but strip out own pid ($$))
14        mkdir -p $RUN_D
15        PID=`pidof $BIN`
16        echo ${PID%$$} > $PID_F
17
18
19}
20
21stop() {
22        killall olsrd
23}
Note: See TracBrowser for help on using the repository browser.