[ale] Need help with running a process from systemd or ???
Mark@markulmer.com
mark at markulmer.com
Sat Apr 22 09:10:56 EDT 2017
Have a look at Monit (https://mmonit.com) which seems to do this exactly.
Mark
> On Apr 22, 2017, at 6:50 AM, Jim Lynch <ale_nospam at fayettedigital.com> wrote:
>
> The situation is that I have a perl script that needs to stay running as long as the system is up. I also need to be able to restart the script at will. I'm currently running it in an infinite loop shell script and it works, but I'm starting it manually. I think I have figured out how to run it via systemd using the Restart=always option, but the application that needs to restart it isn't running as root. Currently it's restarted by sending a KILL to the pid that was stored in the script. The killing program is a web page running PHP.
>
> I'm running Ubuntu 16.04 server.
>
> I don't see a way to run the serviced script as another user. I suppose I could configure sudo to run kill without a password.
>
> Anyway I'm looking for advice as to the best way to handle this situation. Simpler is better.
>
> Thanks,
>
> Jim.
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20170422/87358cb1/attachment.html>
More information about the Ale
mailing list