|
From: | Mike Jakubik |
Subject: | Re: Monit port does not work on bootup |
Date: | Sat, 23 Apr 2022 12:40:47 -0400 |
User-agent: | Zoho Mail |
Idézem/Quoting Mike Jakubik <mike.jakubik@swiftsmsgateway.com>:
> Hi,
>
>
>
> I am using the monit with FreeBSD 13 to auto start some custom
> elixir apps, however, when i freshly boot the server, it fails with
> "env: bash: No such file or directory". It's like monit or the way
> it calls bash cant find env, which is strange, and only on bootup.
> Subsequent calls to the script work fine after i login with the user
> that owns the script.
>
>
>
> Thanks.
Hello Mike!
If you have an ELF binary it is really simple to boot up.
If you have an interpreted language (a script) it is much harder.
I use old start-stop-daemon to start up a PHP script:
https://github.com/szepeviktor/debian-server-tools/blob/master/monitoring/monit/services/_laravel-queue-example
You find all my Monit knowledge in that directory.
All the best to you!
SZÉPE Viktor, webes alkalmazás üzemeltetés / Running your application
https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md
~~~
ügyelet 🌶️ hotline: +36-20-4242498 sms@szepe.net skype: szepe.viktor
Budapest, III. kerület
[Prev in Thread] | Current Thread | [Next in Thread] |