[SOLVED] I need a one time script to kick off after a reboot
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need a one time script to kick off after a reboot
What is the best method to kick off a one time script to run after a system has succesfully rebooted? I have an issue where VMware tools needs to be re-ran after I run yum update and reboot the VM. I was thinking an at job but what if the time to get the system up has passed the time supplied for the script to run?
What is the best method to kick off a one time script to run after a system has succesfully rebooted? I have an issue where VMware tools needs to be re-ran after I run yum update and reboot the VM. I was thinking an at job but what if the time to get the system up has passed the time supplied for the script to run?
Maybe you can use /etc/rc.local to kick of your script. The rc.local script is run once after all the rc stuff is done and before you can log in.
I just noticed you mention Gentoo as being your distro. I do believe Gentoo uses /etc/conf/local.start (or something similar) instead.
for the system to do it automatically, i would put it in /etc/rc.local.
for the user to do it once logged in you can put it in ~/.bash_profile.
some newer distros support a @reboot directive in the users crontab.
for the system to do it automatically, i would put it in /etc/rc.local.
for the user to do it once logged in you can put it in ~/.bash_profile.
some newer distros support a @reboot directive in the users crontab.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.