initial import
This commit is contained in:
21
nbd/nbd-server.initd
Normal file
21
nbd/nbd-server.initd
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/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'
|
||||
}
|
||||
Reference in New Issue
Block a user