On server reboot automatted scripts

Keywords: LAMP/MAMP/WAMP - Microsoft Azure - How to - Other
Description:
I wanted to find out how to setup scripts to be run after the MS Azure VM is restarted?

Hi @PaulWilson,

Thanks for using Bitnami. Can you give us a little more context on what you are trying to achieve?

You can create a new system service and enable it to be run during the server start process, would that work for you? You can check out a guide on this in the official Debian docs

https://wiki.debian.org/systemd/Services

Hi @gongomgra,
As it stands we have a Nodejs application run to service APIs. Of course, in the scenario where the MS Azure VM is restarted, currently we must manually start this up application via SSH.
I’m used to working with a GUI, so I was wanting to know whether it was possible to execute this script as part of the start-up/booting process.
Thanks

Hi @PaulWilson,

I’m afraid I’m not fully understanding your issue. If you are using one of our instances in Azure, the Bitnami services (Apache, MySQL, etc.) should be started automatically on server start. Are you using one of our already built images or did you install it using one of our installers?

currently we must manually start this up application via SSH

Can you clarify this point? Are you running a custom Node.js application on top of our images using a manual command like forever start o similar? If that’s your case, I think creating a new system service as mentioned in the guide I linked should work

Hi @gongomgra,
That is correct we are using one of your instances which was created using an installer, I believe.
Yes, we use the manual command sudo forever start xxx.js
I will give it a shot, and prvide feedback when possible.
Thanks

Hi @PaulWilson,

Thanks for the info. I don’t fully understand if you manually installed our Node installer on your server or if you launched an already image. Can you clarify this?

Hi @gongomgra,
I don’t think it uses your Node installer. It is part of a composer package within the website project. The Nodejs is used for processing API queries.
I hope this helps.
Thanks

Hi @gongomgra,

Would I be able to use this Debian documentation considering that we are running the below setup?
https://docs.bitnami.com/azure/apps/wordpress/

Also is there a way to confirm whether we have your installer version installed?

We have another VM which uses the standard LAMP setup
https://docs.bitnami.com/azure/infrastructure/lamp/

Hi @PaulWilson,

If you launched the LAMP or WordPress server from any of the next links, you didn’t manually install an installer on your server. You are using an already built image, which is fine

https://azuremarketplace.microsoft.com/en-us/marketplace/apps/bitnami.lampstack

https://azuremarketplace.microsoft.com/en-us/marketplace/apps/bitnami.wordpress

Our already built images are configured to start the Bitnami services on every system reboot, so you don’t need to worry about that. You only need to configure your custom Node.js application to do it as well, and I think the guide I shared on the first link is the right way to do it on your server.

Closing this thread per inactivity and too old.