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: | 499 |
Nodes: | 16 (3 / 13) |
Uptime: | 48:13:21 |
Calls: | 9,836 |
Calls today: | 6 |
Files: | 13,764 |
Messages: | 6,193,951 |