File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1212# This is a wrapper to msctl that imitates traditional mscs behaviour:
1313# uses the same default user, config file and location.
1414
15+ # Get executable name
16+ PROG=$( basename $0 )
17+
1518# Load the mscs default file if it exists.
1619MSCS_DEFAULTS=" /etc/default/mscs"
1720if [ -r $MSCS_DEFAULTS ]; then
@@ -26,7 +29,7 @@ USER_NAME=${USER_NAME:-minecraft}
2629LOCATION=${LOCATION:- " /opt/mscs" }
2730
2831# Setup the arguments to the msctl script.
29- MSCS_ARGS=" $MSCS_ARGS -l $LOCATION $@ "
32+ MSCS_ARGS=" -p $PROG -l $LOCATION $MSCS_ARGS $@ "
3033
3134# Run the msctl script.
3235if [ " $USER_NAME " = " $( whoami) " ]; then
Original file line number Diff line number Diff line change 147147# ---------------------------------------------------------------------------
148148while [ " $1 " != " ${1# -} " ]; do
149149 case " $1 " in
150+ -p)
151+ if [ -n " $2 " ]; then
152+ PROG=" $2 "
153+ shift
154+ else
155+ echo " $PROG : '-p' needs a program name argument."
156+ exit 1
157+ fi
158+ ;;
150159 -c)
151160 if [ -n " $2 " ]; then
152161 MSCS_DEFAULTS_CL=" $2 "
You can’t perform that action at this time.
0 commit comments