How to set variables to a non-login account used by a service in CentOS?
Hi there,
I would like to know what is the correct way to define and initialize variables to a non-login account (/usr/bin/false) that run a service on its behalf. Regards. |
Put it in a wrapper script that calls the service.
e.g. If you run a command to start a service named "myservice" but want to set variable called OUTPUTDIR you'd create a simple script that does it:Z Code:
!/bin/bash Script "myenv.sh" Code:
!/bin/bash Code:
* * * * * . /<pathto>/myenv.sh ; /<pathto>/myservice |
All times are GMT -5. The time now is 11:04 PM. |