Browse Source

* update default/i2pd and traditional init script

pull/308/head
hagen 9 years ago
parent
commit
45fd95e02b
  1. 8
      debian/i2pd.default
  2. 13
      debian/i2pd.init

8
debian/i2pd.default vendored

@ -1,7 +1,11 @@
# Defaults for i2pd initscript # Defaults for i2pd initscript
# sourced by /etc/init.d/i2pd # sourced by /etc/init.d/i2pd
# installed at /etc/default/i2pd by the maintainer scripts # installed at /etc/default/i2pd by the maintainer scripts
I2PD_ENABLED="yes"
# port to listen for incoming connections
I2PD_PORT="4567"
# Additional options that are passed to the Daemon. # Additional options that are passed to the Daemon.
DAEMON_OPTS="--host=1.2.3.4 --port=4567 --ircdest=irc.postman.i2p" # see possible switches in /usr/share/doc/i2pd/configuration.md.gz
# change ip and port above to your external address and port DAEMON_OPTS=""

13
debian/i2pd.init vendored

@ -13,10 +13,12 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC=i2pd # Introduce a short description here DESC=i2pd # Introduce a short description here
NAME=i2pd # Introduce the short server's name here NAME=i2pd # Introduce the short server's name here
DAEMON=/usr/sbin/i2pd # Introduce the server's location here DAEMON=/usr/sbin/$NAME # Introduce the server's location here
DAEMON_OPTS="" # Arguments to run the daemon with DAEMON_OPTS="" # Arguments to run the daemon with
PIDFILE=/var/run/$NAME.pid PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME SCRIPTNAME=/etc/init.d/$NAME
I2PCONF=/etc/$NAME/i2pd.conf
TUNCONF=/etc/$NAME/tunnels.conf
# Exit if the package is not installed # Exit if the package is not installed
[ -x $DAEMON ] || exit 0 [ -x $DAEMON ] || exit 0
@ -32,10 +34,17 @@ do_start()
# 0 if daemon has been started # 0 if daemon has been started
# 1 if daemon was already running # 1 if daemon was already running
# 2 if daemon could not be started # 2 if daemon could not be started
if [ "x$I2PD_ENABLED" != "xyes" ]; then
log_warning_msg "disabled in config"
return 2
fi
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1 || return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
--daemon=1 --log=1 $DAEMON_OPTS \ --service=1 --daemon=1 --log=1 --conf=$I2PCONF --tunnelscfg=$TUNCONF \
--port=$I2PD_PORT $DAEMON_OPTS \
|| return 2 || return 2
} }

Loading…
Cancel
Save