Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi.

I need script for auto reboot/restart server after crash or something like that. 

I've found one :

#!/bin/sh
cd /home/minecraft/Kinetic
while true
do
echo "##########STARTING###########"
java -server -Xmx3G -Xms3G -jar forge-1.11.2-13.20.0.2366-universal.jar nogui
echo "Restarting in:"
for i in 5 4 3 2 1
do
echo "$i..."
sleep 1
done
echo "Server Hub Restarting!"
done

But after I trying to start .sh file via terminal I've got an error:

bash: ./start.sh: /bin/bash^M: bad interpreter: No such file or directory

If anyone can help with this I gonna be grateful.

Edited by Redock

  • Author
:/home/minecraft/Kinetic# ./reseter.sh
/bin/sh: 0: Can't open cd /home/minecraft/Kinetic \n while true \n do \n echo "##########STARTING###########" \n java -server -Xmx3G -Xms3G

Script:

#!/bin/sh cd /home/minecraft/Kinetic \n while true \n do \n echo "##########STARTING###########" \n java -server -Xmx3G -Xms3G -jar forge-1.11.2-13.20.0.2366-universal.jar nogui \n echo "Restarting in:" for i in 5 4 3 2 1 \n do \n echo "$i..." \n sleep 1 \n done \n echo "Server Hub Restarting!" \n done

 

  • Author

Checked my editor and default coding is for Linux (/n). So my script should work at start.

  • Author

I checked it and line endings is for Linux /n. So this should work from beginning.

  • Author

On my pc I've got windows 10, but server is on vps on ubuntu 16.04. That's why I'm using n++.

And when I change to bash it's the same error :/

Edited by Redock

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.