Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a way to create a Unix shell script (on HP-UX) that will start on server at boot time only, and will execute the following commands in order:

# cd /mysql
# ./bin/safe_mysqld --user=root &
# ./support-files/mysql.server start

If there is such an option, then where should I put that script in order for it to work? The HP-UX stores its startup scripts in /sbin/init.d/ but there are also links to all of the scripts in the /sbin/rc#.d/ folders, perhaps I should put the link in /sbin/rc3.d/ or maybe I should create a cron job that will execute the script on start?

Any suggestions?

NOTE: This question is in addition to a Server Fault question here.
I just thought that this might be more appropriate place for such question.

share|improve this question

closed as too localized by Michael Mrozek Feb 9 '12 at 17:11

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Why not just flag the question and move it Unix.SE instead of duplicating it. There is an answer already there. –  Karlson Feb 9 '12 at 16:04
You shouldn't cross-post. The SF question has answers and appears to be more up-to-date, so I'm going to close this one. If you want the question here flag the SF version and ask them to migrate it –  Michael Mrozek Feb 9 '12 at 17:10
I think that i found a solution to this one, but I haven't verified it yet.. nvm, I'll post that to SF now.. –  Spirit Feb 10 '12 at 7:54

Browse other questions tagged or ask your own question.