X-Original-To: alpine-user@lists.alpinelinux.org Received: from phosphorusnetworks.com (unknown [146.164.3.46]) by lists.alpinelinux.org (Postfix) with ESMTP id 75CF45C62F6 for ; Fri, 14 Sep 2018 15:30:35 +0000 (GMT) Received: from localhost ([127.0.0.1]) by phosphorusnetworks.com with esmtp (Exim 4.91) (envelope-from ) id 1g0pjw-0005ex-0C for alpine-user@lists.alpinelinux.org; Fri, 14 Sep 2018 12:10:36 -0300 Received: from 127.0.0.1 Fri, 14 Sep 2018 12:10:36 -0300 Message-ID: <592837b969f3310db1ba646542e87e08> In-Reply-To: References: Date: Fri, 14 Sep 2018 12:10:36 -0300 Subject: Re: [alpine-user] Init scripts From: "Fabio Martins" To: alpine-user@lists.alpinelinux.org Reply-To: fm+alpine+user+list@phosphorusnetworks.com User-Agent: mutt X-Mailinglist: alpine-user Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Greylist: Delayed for 00:19:20 by milter-greylist-4.6.2 (lists.alpinelinux.org [0.0.0.0]); Fri, 14 Sep 2018 15:30:35 +0000 (GMT) Hi, A similar service here uses: depend() { use net after logger firewall } also, dont forget to: rc-update add YOUR-SERVICE default cheers. -- Fabio Martins PHOSPHORUS NETWORKS https://phosphorusnetworks.com/en/ > Hi, > > I have an Alpine virtual machine running an OpenHab server. Unfortunately > the server does not restart correctly after a power loss /restart. > I suspect that it is because the service does not wait for the network to > come up. I have to manually start the service after network is up. > > Can someone look at my current init script below and make suggestions to > fix this? > > Thanks, > > #!/sbin/openrc-run > > depend() { > need net > } > > stop() { > /home/bmentink/runtime/bin/stop > } > > command="/home/bmentink/runtime/bin/start" > > # The special RC_SVCNAME variable contains the name of this service. > pidfile="/run/${RC_SVCNAME}.pid" > command_args="-p ${pidfile}" > --- Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org Help: alpine-user+help@lists.alpinelinux.org ---