[ale] Need help with running a process from systemd or ???
DJ-Pfulio
DJPfulio at jdpfu.com
Sat Apr 22 06:56:19 EDT 2017
under [Service] include a line "User=<username>".
Does that not work?
On 04/22/2017 06:50 AM, Jim Lynch 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.
>
More information about the Ale
mailing list