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

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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct