How to start my glass-fish server automatically after reboot instance (ubuntu)
How to start my glass-fish server automatically after reboot instance (ubuntu)
By this command : glassfish4/bin/asadmin start-domain
how to execute this command automatically once i rebooted the linode instance
1 Reply
jcardillo
Linode Staff
There are few options for accomplishing this:
1) Put the command in your crontab file. Edit your crontab by typing sudo crontab -e
. Add the following line:
@reboot glassfish4/bin/asadmin start-domain
2) Put a startup script in your /etc/init.d/
directory. Just be sure to change the permissions of the script (to make it executable):
chmod +x /etc/init.d/mystartup.sh
3) Edit the /etc/rc.local
script directly and add the command as root user. The command should run at the next startup.