I have a simple script which takes commands to start, stop, restart and return the status of a game server (SA:MP). The site provides the solution for using this command:
./samp03svr &
Which works all well and dandy however when the script executes this it holds and waits for user input (pressing ENTER) which then continues script execution.
I can't seem to find a way to keep the scripts execution without waiting for any user input. I've been searching for about 5 hours now and have tried at least 20 different things including running screen. Running screen worked just doesn't provide the exact thing I am looking for. The script also collects the process ID immediately after like so:
mv ./server_log.txt ./logs/server_$NOW.txt
mv ./mysql_log.txt ./logs/mysql_$NOW.txt
./samp03svr <<< echo &
pid=$!
echo $pid > $pidf
echo -e "The server has been started successfully"
The message that comes up waiting for RETURN is:
Started server on port: 7777, with maxplayers: 30 lanmode is OFF.
The server is running 64-bit Ubuntu 12.04.
Thanks in advance.