Taurus
Texass
I found this script:
getting this error
Any help is much appreciated. If someone knows of a better script to autostart that's cool too.
Code:
#!/bin/bash
############################################################################################
# Copyright (c)©2013 Wojciech Bartłomiej Chojnacki <[email protected]>
############################################################################################
# Author homepage should be available at sekai.eu
############################################################################################
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
############################################################################################
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
############################################################################################
# You should have received a copy of the GNU General Public License
# along with this script. If not, see <http ://www.gnu.org/licenses/>.
############################################################################################
warning='\e[01;31m'
hint='\e[01;32m'
cmd='\e[00;00m'
endTag='\e[0m'
#Make sure that user gave required parameters
if [[ ! -n "$1" ]]; then
echo -e "${warning}Not all required parameters has been specified.${endTag}"
echo -e "${hint}The correct syntax:${endTag}"
echo -e "${cmd}$0 yourExecutableNameInCurrentDirectory${endTag}"
exit 1
fi
currentDirectory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
date=`date`
executableFile=$1
while [ true ]; do
echo -e "[${date}]\t${hint}Server is starting...${endTag}"
cd ${currentDirectory} && ./${executableFile}
done
echo -e "[${date}]\t${warning}Server won't start. This warning should NOT never appear.${endTag}"
getting this error
Code:
./autostart.sh: line 40: syntax error: unexpected end of file
Any help is much appreciated. If someone knows of a better script to autostart that's cool too.
Last edited: