source: packages/net/tor/files/tor.init @ 7164

Last change on this file since 7164 was 7164, checked in by mbm, 10 years ago

START/STOP values must be specified in the init script

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 302 bytes
Line 
1#!/bin/sh /etc/rc.common
2# Copyright (C) 2006 OpenWrt.org
3START=50
4
5BIN=tor
6DEFAULT=/etc/default/$BIN
7LOG_D=/var/log/$BIN
8RUN_D=/var/run
9PID_F=$RUN_D/$BIN.pid
10
11start() {
12        [ -f $DEFAULT ] && . $DEFAULT
13        mkdir -p $LOG_D
14        mkdir -p $RUN_D
15        $BIN $OPTIONS
16}
17
18stop() {
19        [ -f $PID_F ] && kill $(cat $PID_F)
20}
21
Note: See TracBrowser for help on using the repository browser.