As per a website, I have created a simple shell script at–> /etc/init.d/jboss
This shell script is to startup/shutdown JBoss AS 7.1.1 in Ubuntu 12.04 64-bit
But when I try and run the script I get an error “Syntax error: unexpected end of file”
and it mentions the last line number of the file.
I used vim to create the above file and the contents of the file are given below– what have I done wrong here?
#Required-Start: $local_fs $remote_fs $network $syslog
#Required-Stop: $local_fs $remote_fs $network $syslog
#Default-Start: 2 3 4 5
#Default-Stop: 0 1 6
#Short-Description: JBOSS 7.1.1 Startup/Shutdown Script
### END INIT INFORMATION
case "$1" in
start)
echo "Starting JBOSS AS 7.1.1"
sudo -u root sh /usr/share/jboss-as-7.1.1/bin/standalone.sh
;;
stop)
echo "Stopping JBOSS AS 7.1.1"
sudo -u root sh /usr/share/jboss-as-7.1.1/bin/jboss-admin.sh --connect command=:shutdown
;;
*)
echo "Usage: /etc/init.d/jboss {start|stop}"
exit 1
;;
You’re missing
esacto balancecase.