mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
* update default init-script : make --port optional
This commit is contained in:
parent
44eccd85fd
commit
ea8e1be294
1
debian/i2pd.default
vendored
1
debian/i2pd.default
vendored
|
@ -4,6 +4,7 @@
|
||||||
I2PD_ENABLED="yes"
|
I2PD_ENABLED="yes"
|
||||||
|
|
||||||
# port to listen for incoming connections
|
# port to listen for incoming connections
|
||||||
|
# comment this line if you want to use value from config
|
||||||
I2PD_PORT="4567"
|
I2PD_PORT="4567"
|
||||||
|
|
||||||
# Additional options that are passed to the Daemon.
|
# Additional options that are passed to the Daemon.
|
||||||
|
|
6
debian/i2pd.init
vendored
6
debian/i2pd.init
vendored
|
@ -41,6 +41,10 @@ do_start()
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$I2PD_PORT" ]; then
|
||||||
|
DAEMON_OPTS="--port $I2PD_PORT $DAEMON_OPTS"
|
||||||
|
fi
|
||||||
|
|
||||||
touch "$PIDFILE"
|
touch "$PIDFILE"
|
||||||
chown -f $USER:adm "$PIDFILE"
|
chown -f $USER:adm "$PIDFILE"
|
||||||
|
|
||||||
|
@ -51,7 +55,7 @@ do_start()
|
||||||
|| return 1
|
|| return 1
|
||||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid "$USER" -- \
|
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid "$USER" -- \
|
||||||
--service --daemon --log=file --logfile=$LOGFILE --conf=$I2PCONF --tunconf=$TUNCONF \
|
--service --daemon --log=file --logfile=$LOGFILE --conf=$I2PCONF --tunconf=$TUNCONF \
|
||||||
--port=$I2PD_PORT $DAEMON_OPTS > /dev/null 2>&1 \
|
$DAEMON_OPTS > /dev/null 2>&1 \
|
||||||
|| return 2
|
|| return 2
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue