Re: Easiest way to automatically run a script after reboot
On 2018-11-10, Steve Williams wrote: > It does a few other housekeeping things like linking the mysql.sock > (MariaDB) from /var/www into the corresponding non-chroot area so that > tools work outside of httpd. No symlink is needed for this, see "chrooted daemons and MariaDB socket" in the mariadb-server pkg-readme for an alternative.
Re: Easiest way to automatically run a script after reboot
Hi, Awesome! Thanks for the pointer to cron! I never knew the @reboot existed :) Cheers, Steve W. On 10/11/2018 3:22 PM, Christian Weisgerber wrote: On 2018-11-10, Steve Williams wrote: I have a script that I would like run after all the network is configured, daemons started, etc. I looked at rc.local, but am not sure what is actually started after the rc.local runs. Let's take a look at /etc/rc: ... [[ -f /etc/rc.local ]] && sh /etc/rc.local # Disable carp interlock. ifconfig -g carp -carpdemote 128 mixerctl_conf echo -n 'starting local daemons:' start_daemon apmd sensorsd hotplugd watchdogd cron wsmoused xenodm echo '.' ... Also, as you can see, cron(8) is started late, and you can put a @reboot entry into crontab(5).
Re: Easiest way to automatically run a script after reboot
On 2018-11-10, Steve Williams wrote: > I have a script that I would like run after all the network is > configured, daemons started, etc. > > I looked at rc.local, but am not sure what is actually started after the > rc.local runs. Let's take a look at /etc/rc: ... [[ -f /etc/rc.local ]] && sh /etc/rc.local # Disable carp interlock. ifconfig -g carp -carpdemote 128 mixerctl_conf echo -n 'starting local daemons:' start_daemon apmd sensorsd hotplugd watchdogd cron wsmoused xenodm echo '.' ... Also, as you can see, cron(8) is started late, and you can put a @reboot entry into crontab(5). -- Christian "naddy" Weisgerber na...@mips.inka.de
Easiest way to automatically run a script after reboot
Hi, I have a script that I would like run after all the network is configured, daemons started, etc. For example, it does a file system check on a large externally attached drive that isn't always there. It is not auto mounted. If the system goes down unexpectedly, I don't want the boot to be held up while the file system check is done. It does a few other housekeeping things like linking the mysql.sock (MariaDB) from /var/www into the corresponding non-chroot area so that tools work outside of httpd. eg: ln /var/www/var/run/mysql/mysql.sock /var/run/mysql/mysql.sock What would be the best place to invoke this? I looked at rc.local, but am not sure what is actually started after the rc.local runs. Are there any other easy hooks to run my script? From man(8) rc rc.local is executed towards the end of rc (it is not the very last as there are a few services that must be started at the very end). Normally, rc.local contains commands and daemons that are not part of the stock installation. Thanks, Steve Williams