diff options
| author | Michael Mason <ms13sp@gmail.com> | 2009-02-24 03:04:18 +0000 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-02-24 09:03:25 +0000 |
| commit | 246c02013c1e1840e0e3e333157981c82b7d620a (patch) | |
| tree | 9abfeea130c9853f2437a0c3881fb27b02fd4e47 /extra/tinyproxy/tinyproxy.initd | |
| parent | 4aae1ff1d78b73e8973080dbf7361cafdb7fd095 (diff) | |
| download | aports-246c02013c1e1840e0e3e333157981c82b7d620a.tar.bz2 aports-246c02013c1e1840e0e3e333157981c82b7d620a.tar.xz | |
extra/tinyproxy Initial commit of file
Diffstat (limited to 'extra/tinyproxy/tinyproxy.initd')
| -rw-r--r-- | extra/tinyproxy/tinyproxy.initd | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/extra/tinyproxy/tinyproxy.initd b/extra/tinyproxy/tinyproxy.initd new file mode 100644 index 0000000000..980c53e72d --- /dev/null +++ b/extra/tinyproxy/tinyproxy.initd @@ -0,0 +1,39 @@ +#!/sbin/runscript + +# Sample init.d file for alpine linux. + +NAME= +DAEMON=/usr/sbin/$NAME + +depend() { + need net +} + +start() { + ebegin "Starting ${NAME}" + start-stop-daemon --start --quiet --background \ + --make-pidfile --pidfile /var/run/${NAME}.pid \ + --chuid ${USER}:${GROUP} \ + --exec ${DAEMON} -- ${OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${NAME}" + start-stop-daemon --stop --quiet \ + --exec ${DAEMON} \ + --pidfile /var/run/${NAME}.pid \ + eend $? +} + +reload() { + ebegin "Reloading ${NAME}" + if ! service_started "${NAME}" ; then + eend 1 "${NAME} is not started" + return 1 + fi + start-stop-daemon --stop --oknodo --signal HUP \ + --exec ${DAEMON} --pidfile /var/run/${NAME}.pid + eend $? +} + |
