how to autorun script at startup as administrator?
Rashkae
ubuntu at tigershaunt.com
Sat Dec 21 20:50:14 UTC 2019
On 2019-12-18 2:45 p.m., Dave Stevens wrote:
>
> Can anyone point me in the direction of a script running as admin
> without intervention?
>
> d
>
What exactly what rc.local does.. it run as root (so use caution what
you just throw in there.)
Unlike what was previously mentioned on this list, rc.local does *not*
block login, so the worst that can happen if you don't use a & on a one
of the scripts is the rest of rc.local does not run.
It's lazy and bad form, but I often include a sleep command in my
rc.local if I want something that will not start until the rest of the
system startup has had a chance to finish, (even though rc.local itself,
on systemd systems, starts very late in the sequence.)
It's also important to note that the default rc.local script on systemd
has the default systemd kill behaviour, will will forcefully terminate
any child processes early on system shutdown. This is different
behaviour from traditional rc.d, and might catch up unexpectedly. (It
was an issue, for example, when I use rc.local to auto start Virtualbox
VM's)
More information about the ubuntu-users
mailing list