Skip to content

Commit

Permalink
Options to specify port in startup script
Browse files Browse the repository at this point in the history
  • Loading branch information
Mar2zz committed Dec 23, 2011
1 parent ae169d8 commit 562189b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions default.ubuntu
Expand Up @@ -28,6 +28,9 @@ CONFIG=
# otherwise, the default location (~/.couchpotato) is used:
DATADIR=

# [optional] Force port number to listen on, otherwise the one set in config.ini is used:
PORT=

# [optional] full path for the pidfile
# otherwise, the default location /var/run/couchpotato/couchpotato.pid is used:
PID_FILE=
3 changes: 2 additions & 1 deletion initd.ubuntu
Expand Up @@ -30,7 +30,7 @@ SETTINGS_LOADED=FALSE
DESC=CouchPotato

# only accept values from /etc/default/couchpotato
unset RUN_AS CONFIG DATADIR PID_FILE
unset RUN_AS CONFIG DATADIR PORT PID_FILE

. /lib/lsb/init-functions

Expand Down Expand Up @@ -74,6 +74,7 @@ load_settings() {
[ -z "$CONFIG" ] && DAEMON_OPTS="$DAEMON_OPTS --config=/home/$RUN_AS/.couchpotato/config.ini"
[ -n "$DATADIR" ] && DAEMON_OPTS="$DAEMON_OPTS --datadir=$DATADIR"
[ -z "$DATADIR" ] && DAEMON_OPTS="$DAEMON_OPTS --datadir=/home/$RUN_AS/.couchpotato"
[ -n "$PORT" ] && DAEMON_OPTS="$DAEMON_OPTS --port=$PORT"
if ! [ -n "$PID_FILE" ]; then
PID_FILE=/var/run/couchpotato/couchpotato.pid
fi
Expand Down

0 comments on commit 562189b

Please sign in to comment.