Browse files

added PORT to default

  • Loading branch information...
1 parent 93e2742 commit 3077b7557b5f1f8f9b3893694d83e50a60a2e499 @mrkipling committed Jun 16, 2012
Showing with 9 additions and 1 deletion.
  1. +3 −0 default
  2. +6 −1 initd
View
3 default
@@ -19,3 +19,6 @@ RUN_AS=root
# [optional] full path for the pidfile
# otherwise, the default location /var/run/maraschino/maraschino.pid is used:
PID_FILE=
+
+# [required] port to listen on (defaults to 7000)
+PORT=7000
View
7 initd
@@ -60,16 +60,21 @@ load_settings() {
log_warning_msg "$DESC: path to $DESC not set, aborting. See $SETTINGS";
return 1; }
+ [ -n "$PORT" ] || {
+ log_warning_msg "$DESC: port not set, aborting. See $SETTINGS";
+ return 1; }
+
[ $ENABLE_DAEMON != 1 ] && {
log_warning_msg "$DESC: daemon not enabled, aborting. See $SETTINGS";
return 1; }
[ -z "$RUN_AS" ] && {
log_warning_msg "$DESC: daemon username not set, aborting. See $SETTINGS";
return 1; }
+
[ -z "${RUN_AS%:*}" ] && exit 1
- DAEMON_OPTS="Maraschino.py"
+ DAEMON_OPTS="Maraschino.py --port=$PORT"
[ -n "$PID_FILE" ] && PID_FILE=$PID_FILE
[ -n "$PID_FILE" ] || PID_FILE=/var/run/maraschino/maraschino.pid

0 comments on commit 3077b75

Please sign in to comment.