Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to set a script that will only run one time on a Centos 6.x box and then never run again, since it's going to set some system options based on hardware and then it's all set.

share|improve this question
    
See serverfault.com/questions/148341/… for some suggestions. –  Daniel Andersson Sep 12 '13 at 15:09

1 Answer 1

The answers over on Server Fault are very good. For an even simpler version you could either i) just run the script yourself once. or ii) add a @reboot cron and then delete it:

echo "@reboot root NAME.sh && sed -i '/NAME/d' /etc/crontab" >> /etc/crontab
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.