mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
39 lines
941 B
Text
39 lines
941 B
Text
#!/sbin/openrc-run
|
|
|
|
pidfile="/var/run/dotnet/dotnet.pid"
|
|
logfile="/var/log/dotnet/dotnet.log"
|
|
mainconf="/etc/dotnet/dotnet.conf"
|
|
tunconf="/etc/dotnet/tunnels.conf"
|
|
tundir="/etc/dotnet/tunnels.conf.d"
|
|
|
|
name="dotnet"
|
|
command="/usr/sbin/dotnet"
|
|
command_args="--service --daemon --log=file --logfile=$logfile --conf=$mainconf --tunconf=$tunconf --tunnelsdir=$tundir --pidfile=$pidfile"
|
|
description="dotnet router written in C++"
|
|
required_dirs="/var/lib/dotnet"
|
|
required_files="$mainconf"
|
|
start_stop_daemon_args="--chuid dotnet"
|
|
|
|
depend() {
|
|
need mountall
|
|
use net
|
|
after bootmisc
|
|
}
|
|
|
|
start_pre() {
|
|
if [ -r /etc/default/dotnet ]; then
|
|
. /etc/default/dotnet
|
|
fi
|
|
|
|
if [ "x$DOTNET_ENABLED" != "xyes" ]; then
|
|
ewarn "dotnet disabled in /etc/default/dotnet"
|
|
exit 1
|
|
fi
|
|
|
|
checkpath -f -o dotnet:adm $logfile
|
|
checkpath -f -o dotnet:adm $pidfile
|
|
|
|
if [ -n "$DAEMON_OPTS" ]; then
|
|
command_args="$command_args $DAEMON_OPTS"
|
|
fi
|
|
}
|