22 lines
486 B
Plaintext
22 lines
486 B
Plaintext
#!/sbin/openrc-run
|
|
# Copyright 2022 Hyperbola Project
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
description='nbd - the network block devices server'
|
|
pidfile='/run/nbd-server.pid'
|
|
command='/usr/bin/nbd-server'
|
|
command_args="${NBD_OPTS}"
|
|
start_stop_daemon_args="--pidfile ${pidfile}"
|
|
|
|
depend() {
|
|
use net dns logger
|
|
}
|
|
|
|
start_pre() {
|
|
if [ ! -f /etc/nbd-server/config ]; then
|
|
eerror 'Please create /etc/nbd-server/config'
|
|
return '1'
|
|
fi
|
|
return '0'
|
|
}
|