X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from ncopa-desktop.alpinelinux.org (3.203.202.84.customer.cdi.no [84.202.203.3]) (using SSLv3 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by mail.alpinelinux.org (Postfix) with ESMTPSA id CB7A4DC0265; Tue, 15 Jul 2014 14:17:15 +0000 (UTC) Date: Tue, 15 Jul 2014 16:17:13 +0200 From: Natanael Copa To: Paul Kilar Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [PATCH] testing/dante: new aport https://www.inet.no/dante/ Dante - A free SOCKS server Message-ID: <20140715161713.45d96990@ncopa-desktop.alpinelinux.org> In-Reply-To: <1405354456-6025-1-git-send-email-pkilar@gmail.com> References: <1405354456-6025-1-git-send-email-pkilar@gmail.com> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 14 Jul 2014 12:14:16 -0400 Paul Kilar wrote: > --- > testing/dante/APKBUILD | 64 ++++++++++++++++++++++++++++++++++ > testing/dante/dante-server.pre-install | 5 +++ > testing/dante/sockd.confd | 2 ++ > testing/dante/sockd.initd | 43 +++++++++++++++++++++++ > 4 files changed, 114 insertions(+) > create mode 100644 testing/dante/APKBUILD > create mode 100644 testing/dante/dante-server.pre-install > create mode 100644 testing/dante/sockd.confd > create mode 100644 testing/dante/sockd.initd > ... > --- /dev/null > +++ b/testing/dante/sockd.initd > @@ -0,0 +1,43 @@ > +#!/sbin/runscript > +# > +# startup script for sockd daemon > +# > + > +depend() { > + need net > + after firewall > + provide sockd > + use dns > +} I believe the rest could be rewritten as: command=/usr/sbin/sockd pidfile=/var/run/${SVCNAME}.pid command_args="${SOCKD_OPTS}" start_pre() { $command -V } and that should be enough see: http://www.linuxhowtos.org/manpages/8/runscript.htm > + > +SOCKD_PIDFILE=${SSHD_PIDFILE:-/var/run/${SVCNAME}.pid} > +SOCKD_BINARY=${SSHD_BINARY:-/usr/sbin/sockd} SSHD? > + > +check_config() { > + $SOCKD_BINARY -V || return 1 > +} > + > +######################################################################################### > + > +start() { > + check_config || return 1 > + ebegin "Starting ${SVCNAME}" > + start-stop-daemon --start --exec "${SOCKD_BINARY}" \ > + --pidfile "${SOCKD_PIDFILE}" \ > + -- ${SOCKD_OPTS} > + eend $? > +} > + > +stop() { > + ebegin "Stopping ${SVCNAME}" > + start-stop-daemon --stop --exec "${SOCKD_BINARY}" \ > + --pidfile "${SOCKD_PIDFILE}" --quiet > + eend $? > +} > + > +restart() { > + ebegin "Restarting ${SVCNAME}" > + stop > + start > + eend $? > +} restart is not needed to define. openrc will do the stop/start for you. -nc --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---