~alpine/users

[alpine-user] Init scripts

Bernard Mentink <bmentink@gmail.com>
Details
Message ID
<CALEed8Z6yWRx0c4pDgOd15yCdwWXYTqJ_yqo+iXDnBfZO3zWFA@mail.gmail.com>
Sender timestamp
1536123009
DKIM signature
missing
Download raw message
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}"
Reply to thread Export thread (mbox)