Date: Thu, 19 Aug 2021 16:25:11 +1000 From: Aristedes Maniatis via freebsd-stable <freebsd-stable@freebsd.org> To: Jonathan Chen <jonc@chen.org.nz> Cc: freebsd-stable <freebsd-stable@freebsd.org> Subject: Re: Run script as root without sudo Message-ID: <f163070a-03a8-7b37-e2e8-7e6c3d3169d8@ish.com.au> In-Reply-To: <CAJuc1zP_xLCz-SP4yvr2_m4zKFWVxBdDfMXBtjXSpaD=N=O6WA@mail.gmail.com> References: <a7d48318-6b21-231e-1042-2d2daad72c50@ish.com.au> <CAJuc1zP_xLCz-SP4yvr2_m4zKFWVxBdDfMXBtjXSpaD=N=O6WA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
That would require root to put the file there and then to reboot the machine. Ari On 19/8/21 4:16pm, Jonathan Chen wrote: > On Thu, 19 Aug 2021 at 17:33, Aristedes Maniatis via freebsd-stable > <freebsd-stable@freebsd.org> wrote: > [...] >> How else can I get this script running as root remotely in a completely >> unattended way? > The way it's usually done is with an rc script in /usr/local/etc/rc.d, eg: > /usr/local/etc/rc.d/myscript > > and add the entry into /etc/rc.conf: > myscript_enable="YES" > > The FreeBSD AWS instances uses this method to auto-install required packages. > > Cheers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f163070a-03a8-7b37-e2e8-7e6c3d3169d8>