Mail archive
alpine-user

Re: [alpine-user] Init scripts

From: Fabio Martins <fm+alpine+user+list_at_phosphorusnetworks.com>
Date: Fri, 14 Sep 2018 12:10:36 -0300

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_at_lists.alpinelinux.org
Help:         alpine-user+help_at_lists.alpinelinux.org
---
Received on Fri Sep 14 2018 - 12:10:36 GMT