Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniel_Taney
Advisor
Jump to solution

Best Method To Run A Script On Gateway Boot?

What is the best way to have a custom script launch when a Gateway boots up? I'd preferably want it to happen pretty late in the start-up process... at least once all the network interfaces have come up.

Thanks!

Dan

R80 CCSA / CCSE
1 Solution

Accepted Solutions
Danny
Champion Champion
Champion

The -Best- method to have GAiA running a script at system boot in my mind is using it's built-in functionality for this:

View solution in original post

9 Replies
HeikoAnkenbrand
Champion Champion
Champion

Hi Daniel,

you can use the following script:

/etc/rc.local

This script will be executed *after* all the other init scripts. You can put your own initialization stuff in here if you don't want to do the full Sys V style init stuff.

Or use a "/etc/rc3.d" start script:

/etc/rc3.d/Sxx_myscript

xx is the position of the start script.

Regards

Heiko

➜ CCSM Elite, CCME, CCTE ➜ www.checkpoint.tips
0 Kudos
Daniel_Taney
Advisor

Excellent! Thank you!

R80 CCSA / CCSE
DeletedUser
Not applicable

On Gaia would add an entry to /etc/rc.local. One example use case is from Keld Norman: iPhone Real-time Push notification on SmartEvent.

On Gaia embedded check out sk11818: How to make kernel parameters survive reboot on SMB appliances.

0 Kudos
JozkoMrkvicka
Authority
Authority

I am using /etc/rc.local to issue "ethtool -r eth1-01" because in some special cases FIBER ports didnt came up after reboot (or set off/on). Maybe issue on the switch, maybe SFP, dont know, but this is workaround working in case of unexpected reboot happened.

Kind regards,
Jozko Mrkvicka
0 Kudos
JozkoMrkvicka
Authority
Authority

Or maybe using @reboot in crontab ? Will it work to execute some script after reboot ? Someone tried ? What in case system was halted ? just thinking loud...

Kind regards,
Jozko Mrkvicka
0 Kudos
Danny
Champion Champion
Champion

The -Best- method to have GAiA running a script at system boot in my mind is using it's built-in functionality for this:

PhoneBoy
Admin
Admin

While I don't think we're deprecating rc.local anytime soon, this is definitely the more supported approach.

0 Kudos
Daniel_Taney
Advisor

I didn't realize "At Startup" was an option in GAiA's scheduler. In my opinion that's even better than modifying rc.local just in case that gets deprecated at some point. Thanks!

R80 CCSA / CCSE
0 Kudos
PhoneBoy
Admin
Admin

It's also more likely to get backed up through the standard backup methods Smiley Happy

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events