mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-11 13:27:52 +00:00
* update debian/i2pd.{init,upstart} : logging options
This commit is contained in:
parent
60b2da3671
commit
dcab37a148
6
debian/i2pd.init
vendored
6
debian/i2pd.init
vendored
@ -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()
|
||||
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
3
debian/i2pd.upstart
vendored
@ -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…
Reference in New Issue
Block a user