Jump to content

Why are my start scripts not working?

I have some start sh scripts on my server to auto-start my services, However when I try to run them they do nothing.

They worked fine until I tried to make them run as a user, They ran as root before, And pretty sure that's a bad idea. So I made users with no root access and only access to their files. I think they have execute permission, i did chmod +x to each of them

Here is the first part:

 

sudo su - minecraft
cd /home/minecraft/CreeperVillage3/
./Start.sh

 

This leads to an sh file with this:

screen -AmdS CreeperVillage3 java -Xmx5048M -Xmx5048M -jar paper-1.20.4.jar

 

 

I need a linux pro to help lol.

I would post this on stack exchange, But I get bullied and harassed and get negative votes. Not sure what I do wrong to offend them

Link to comment
Share on other sites

Link to post
Share on other sites

It might be easier to figure out what's happening if we can see inside the Start.sh

See if you can run the following:

cat /home/minecraft/CreeperVillage3/Start.sh

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Marvin_The_Robot said:

It might be easier to figure out what's happening if we can see inside the Start.sh

See if you can run the following:

cat /home/minecraft/CreeperVillage3/Start.sh

Oh, yeah i put that in the post:

screen -AmdS CreeperVillage3 java -Xmx5048M -Xmx5048M -jar paper-1.20.4.jar

Link to comment
Share on other sites

Link to post
Share on other sites

Sorry I don't know much about Minecraft servers, but I'm not sure why it has -Xmx5048M written in the instruction twice. (It's possible the first one should be Xms5048M)

Also I think .sh scripts normally have a #!bin/bash or #!bin/sh line at the top. 

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Marvin_The_Robot said:

Sorry I don't know much about Minecraft servers, but I'm not sure why it has -Xmx5048M written in the instruction twice. (It's possible the first one should be Xms5048M)

Also I think .sh scripts normally have a #!bin/bash or #!bin/sh line at the top. 

 

The two Xmx arguments are for the min and max ram. I have it set the same so that it can not use less or more , it creates memory leaks with minecraft

Link to comment
Share on other sites

Link to post
Share on other sites

16 minutes ago, jsnotlout1 said:

The two Xmx arguments are for the min and max ram. I have it set the same so that it can not use less or more , it creates memory leaks with minecraft

Are you sure the first one should be Xmx and not Xms?

I'm just going off this video, so I could be wrong.
 

 

Link to comment
Share on other sites

Link to post
Share on other sites

59 minutes ago, Marvin_The_Robot said:

Are you sure the first one should be Xmx and not Xms?

I'm just going off this video, so I could be wrong.
 

 

It always worked before, And it works flawlessly without su. I have no idea how people do this. I just want the screen session to start as another user. Not root

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×