mirror of https://github.com/PurpleI2P/i2pd.git
I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website/
40 lines
900 B
40 lines
900 B
9 years ago
|
#!/sbin/openrc-run
|
||
|
|
||
8 years ago
|
pidfile="/var/run/i2pd/i2pd.pid"
|
||
|
logfile="/var/log/i2pd/i2pd.log"
|
||
9 years ago
|
mainconf="/etc/i2pd/i2pd.conf"
|
||
|
tunconf="/etc/i2pd/tunnels.conf"
|
||
6 years ago
|
tundir="/etc/i2pd/tunnels.conf.d"
|
||
9 years ago
|
|
||
|
name="i2pd"
|
||
|
command="/usr/sbin/i2pd"
|
||
6 years ago
|
command_args="--service --daemon --log=file --logfile=$logfile --conf=$mainconf --tunconf=$tunconf --tunnelsdir=$tundir --pidfile=$pidfile"
|
||
9 years ago
|
description="i2p router written in C++"
|
||
|
required_dirs="/var/lib/i2pd"
|
||
|
required_files="$mainconf"
|
||
|
start_stop_daemon_args="--chuid i2pd"
|
||
|
|
||
|
depend() {
|
||
|
need mountall
|
||
|
use net
|
||
|
after bootmisc
|
||
|
}
|
||
|
|
||
|
start_pre() {
|
||
9 years ago
|
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 i2pd:adm $logfile
|
||
|
checkpath -f -o i2pd:adm $pidfile
|
||
|
|
||
|
if [ -n "$DAEMON_OPTS" ]; then
|
||
|
command_args="$command_args $DAEMON_OPTS"
|
||
|
fi
|
||
9 years ago
|
}
|