mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-07-01 10:14:36 +02:00
40 lines
929 B
Text
40 lines
929 B
Text
#!/sbin/openrc-run
|
|
|
|
name="Invisible Internet Protocol daemon"
|
|
description="i2p router written in C++"
|
|
|
|
pidfile="/run/i2pd/i2pd.pid"
|
|
logfile="/var/log/i2pd/i2pd.log"
|
|
mainconf="/etc/i2pd/i2pd.conf"
|
|
tunconf="/etc/i2pd/tunnels.conf"
|
|
tundir="/etc/i2pd/tunnels.conf.d"
|
|
|
|
command="/usr/bin/i2pd"
|
|
command_args="--daemon --service --conf=$mainconf --tunconf=$tunconf --tunnelsdir=$tundir --pidfile=$pidfile --log=file --logfile=$logfile "
|
|
command_user="i2pd"
|
|
required_dirs="/var/lib/i2pd"
|
|
required_files="/etc/i2pd/i2pd.conf"
|
|
|
|
depend() {
|
|
need mountall
|
|
use net
|
|
after bootmisc
|
|
}
|
|
|
|
start_pre() {
|
|
if [ -r /etc/default/i2pd ]; then
|
|
. /etc/default/i2pd
|
|
fi
|
|
|
|
if [ "x$I2PD_ENABLED" != "xyes" ]; then
|
|
ewarn "i2pd disabled in /etc/default/i2pd"
|
|
exit 1
|
|
fi
|
|
|
|
checkpath -f -o $command_user $logfile
|
|
checkpath -f -o $command_user $pidfile
|
|
|
|
if [ -n "$DAEMON_OPTS" ]; then
|
|
command_args="$command_args $DAEMON_OPTS"
|
|
fi
|
|
}
|