Hi,
how can a (bash) script find out whether it runs under launchd?
In message <j6f4rcFu3g7U2@mid.individual.net> Dr Eberhard Lisse <nospam@lisse.NA> wrote:
Hi,
how can a (bash) script find out whether it runs under launchd?
the usual way to see how a script was launched is to check the EUID,
but I am not sure that will tell you with launchd
For example, to check if the script was launched by root:
if [[ $EUID -ne 0 ]]; then
echo "root user required"
exit 1
fi
Thank you for answering a question that I did not ask, the answer to
which I knew and was not helpful. Which was unsurprising.
In message <j6jtpoFri67U1@mid.individual.net> Dr Eberhard Lisse <nospam@lisse.NA> wrote:
Thank you for answering a question that I did not ask, the answer to
which I knew and was not helpful. Which was unsurprising.
I apologize for attempting to help you. It will not ever happen
again.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 24:49:33 |
Calls: | 10,390 |
Calls today: | 1 |
Files: | 14,064 |
Messages: | 6,417,015 |