Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
aports
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
642
Issues
642
List
Boards
Labels
Service Desk
Milestones
Merge Requests
194
Merge Requests
194
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
aports
Commits
4259b276
Commit
4259b276
authored
Jul 30, 2009
by
Natanael Copa
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main/dnscache: fix init.d script
fixes
#101
parent
b36359db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
35 deletions
+13
-35
main/djbdns/APKBUILD
main/djbdns/APKBUILD
+2
-2
main/djbdns/dnscache.initd
main/djbdns/dnscache.initd
+11
-33
No files found.
main/djbdns/APKBUILD
View file @
4259b276
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname
=
djbdns
pkgver
=
1.05
pkgrel
=
2
6
pkgrel
=
2
7
pkgdesc
=
"Excellent high-performance DNS services"
url
=
"http://cr.yp.to/djbdns.html"
license
=
"public-domain"
...
...
@@ -82,5 +82,5 @@ c7be73fe2fb4ae02d5096fa2c1f55a68 1.05-errno.patch
e8a84fc4ee5ff1525b4f74889422e93c tinydns.initd
7dcf6674c07d46c736b3c25d9c92384a tinydns.confd
e09c3a6ba6917e16f4736ab5c070dbe9 dnscache.pre-install
e368a86ddc320937d663dd47684ba410
dnscache.initd
1f6d29a29382e0bb7e865aede9e07c9d
dnscache.initd
e2938593277d7a87806e70e145a90c3f dnscache.confd"
main/djbdns/dnscache.initd
View file @
4259b276
...
...
@@ -3,17 +3,17 @@
# written for alpine linux - NBA April 2007
# -- Statrup variables
UID=$( grep dnscache /etc/passwd | cut -f3 -d: )
GID=$( grep dnscache /etc/group | cut -f3 -d: )
ROOT=/etc/dnscache
DAEMON=/usr/bin/dnscache
VARRUN=/var/run/dnscache
PIDFILE=/var/run/dnscache.pid
#-----------------------------------------------------------------
# Main program
start() {
UID=$( grep dnscache /etc/passwd | cut -f3 -d: )
GID=$( grep dnscache /etc/group | cut -f3 -d: )
ebegin "Starting dnscache"
if [ -z "$UID" ] || [ -z "$GID" ]; then
...
...
@@ -21,39 +21,17 @@ start() {
return 1
fi
# if its already running, just report it is
if [ -e ${VARRUN}.pid ] && [ -d /proc/$( cat ${VARRUN}.pid ) ]; then
eend 0
return 0
fi
(
export UID GID ROOT
[ -n "$IPSEND" ] && export IPSEND
[ -n "$IP" ] && export IP
[ -n "$HIDETTL" ] && export HIDETTL
[ -n "$IPSEND" ] && export IPSEND
[ -n "$CACHESIZE" ] && export CACHESIZE
[ -n "$FORWARDONLY" ] && export FORWARDONLY
$DAEMON </dev/urandom >/dev/null 2>/dev/null &
pid=$!
sleep 1
# Check if its still running
if ! [ -d /proc/$pid ]; then
$DAEMON </dev/urandom
return 1
fi
echo $pid > ${VARRUN}.pid
eend $?
return 0
)
start-stop-daemon --start --env "UID=$UID" --env "GID=$GID" \
--env "ROOT=$ROOT" --env "IP=$IP" --env "IPSEND=$IPSEND" \
--env "HIDETTL=$HIDETTL" --env "CACHESIZE=$CACHESIZE" \
--env "FORWARDONLY=$FORWARDONLY" --pidfile $PIDFILE \
--background --make-pidfile --exec $DAEMON
eend $?
}
stop() {
ebegin "Stopping dnscache"
start-stop-daemon --stop -m --pidfile ${VARRUN}.pid --oknodo \
--exec $DAEMON && rm ${VARRUN}.pid
eend $?
start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON
eend $?
}
Christoffer Leitet
@cleitet
mentioned in issue
#101 (closed)
·
Jul 12, 2019
mentioned in issue
#101 (closed)
mentioned in issue #101
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment