Browse Source

* update debian/i2pd.{init,upstart} : logging options

pull/373/head
hagen 9 years ago
parent
commit
dcab37a148
  1. 6
      debian/i2pd.init
  2. 3
      debian/i2pd.upstart

6
debian/i2pd.init vendored

@ -18,6 +18,7 @@ DAEMON_OPTS="" # Arguments to run the daemon with @@ -18,6 +18,7 @@ DAEMON_OPTS="" # Arguments to run the daemon with
PIDFILE=/var/run/$NAME.pid
I2PCONF=/etc/$NAME/i2pd.conf
TUNCONF=/etc/$NAME/tunnels.conf
LOGFILE=/var/log/$NAME.log
USER="i2pd"
# Exit if the package is not installed
@ -43,10 +44,13 @@ do_start() @@ -43,10 +44,13 @@ do_start()
touch "$PIDFILE"
chown -f $USER:adm "$PIDFILE"
touch "$LOGFILE"
chown -f $USER:adm "$LOGFILE"
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid "$USER" --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid "$USER" -- \
--service --daemon --log --conf=$I2PCONF --tunconf=$TUNCONF \
--service --daemon --log=file --logfile=$LOGFILE --conf=$I2PCONF --tunconf=$TUNCONF \
--port=$I2PD_PORT $DAEMON_OPTS > /dev/null 2>&1 \
|| return 2
return $?

3
debian/i2pd.upstart vendored

@ -6,5 +6,6 @@ stop on runlevel [016] or unmounting-filesystem @@ -6,5 +6,6 @@ stop on runlevel [016] or unmounting-filesystem
# these can be overridden in /etc/init/i2pd.override
env I2PD_HOST="1.2.3.4"
env I2PD_PORT="4567"
env LOGFILE="/var/log/i2pd.log"
exec /usr/sbin/i2pd --daemon --log --host=$I2PD_HOST --port=$I2PD_PORT
exec /usr/sbin/i2pd --daemon --log=file --logfile=$LOGFILE --service --host=$I2PD_HOST --port=$I2PD_PORT

Loading…
Cancel
Save