Open morgantic opened 5 months ago
Hi @morgantic.
I'm not sure what the issue is. It looks like you have things set up correctly. So, I'm just going to ask simple questions to see if we can find the issue together.
ls -la /usr/local/bin/msctl
ls -la /usr/local/bin/mscs
ls -la /opt/mscs
Hi @sandain - I appreciate you taking your time to help me on this.
1.
$ ls -la /usr/local/bin/msctl
-rwxr-xr-x. 1 root root 127248 Feb 10 21:12 /usr/local/bin/msctl
2.
$ ls -la /usr/local/bin/mscs
-rwxr-xr-x. 1 root root 905 Feb 10 21:12 /usr/local/bin/mscs
3.
$ ls -la /opt/mscs
ls: cannot open directory '/opt/mscs': Permission denied
$ sudo !!
sudo ls -la /opt/mscs
total 12
drwx------. 2 minecraft minecraft 62 Feb 10 21:12 .
drwxr-xr-x. 5 root root 60 Feb 10 21:12 ..
-rw-r--r--. 1 minecraft minecraft 18 Aug 2 2022 .bash_logout
-rw-r--r--. 1 minecraft minecraft 141 Aug 2 2022 .bash_profile
-rw-r--r--. 1 minecraft minecraft 376 Aug 2 2022 .
4. I don't think I have overviewer installed, because I don't know what it is. From what I can find on google, it's a mapper / online map? But I'll just ignore it then, thanks!
That all looks good. How about the following?
sudo "PATH=$PATH" -u minecraft -H which msctl
sudo "PATH=$PATH" -u minecraft -H which mscs
$ sudo "PATH=$PATH" -u minecraft -H which msctl
/usr/local/bin/msctl
and
$ sudo "PATH=$PATH" -u minecraft -H which mscs
/usr/local/bin/mscs
I don't know why it is not working. Very odd. Maybe modify the mscs
script to use the full path to msctl:
#!/bin/sh
### BEGIN INIT INFO
# Provides: mscs
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# chkconfig: 345 50 50
# Description: Minecraft Server Control Script
### END INIT INFO
# This is a wrapper to msctl that imitates traditional mscs behaviour:
# uses the same default user, config file and location.
# Get executable name
PROG=$(basename $0)
# Setup the default user name.
USER_NAME="minecraft"
# Setup the default installation location.
LOCATION="/opt/mscs"
# Setup the default location of the mscs.defaults file.
MSCS_DEFAULTS="$LOCATION/mscs.defaults"
# Setup the arguments to the msctl script.
MSCS_ARGS="-p $PROG -l $LOCATION -c $MSCS_DEFAULTS $@"
# Run the msctl script.
if [ "$USER_NAME" = "$(whoami)" ]; then
/usr/local/bin/msctl $MSCS_ARGS
else
sudo "PATH=$PATH" -u $USER_NAME -H /usr/local/bin/msctl $MSCS_ARGS
fi
I'm this issue with mscs:
I tried the automatic installation first, and then re-tried with the manual installation, no luck.
$PATH seems fine as well:
When I try to run msctl directly I get this
I'm running the OCI with oracle linux if that help narrow down the issue, can someone help? Thanks!