Clone
3
Customization Hook Ins
MaStr edited this page 2012-06-15 09:04:45 -07:00

Customization Hook-Ins

That are prepared scripts which are running during different parts of initial startup, startup or stop. With this scripts, you can easily initiate custom scripts or modifications on startup without being much invasive to the piratebox-scripts. This enables you to adapt updates of the PirateBoxScripts_Webserver packages to your modificated piratebox more easier that changing scripts etc. for updating.

Every hook gets its the piratebox.conf as a first parameter. So you have all known parameter and folder-variables you need. You can place your own variables in conf/hook_custom.conf, which is included in runtime.

In the following the hooks are described and are all located int piratebox/bin/hooks/

1 - hook_pre_openwrt_init.sh

For OpenWRT Systems.

  • Modificate stuff right before "install_piratebox.sh init_openwrt" is called
  • is called once during init-phase
  • is called before openwrt init-step
  • Loads piratebox.common stuff from /etc/ which is placed form piratebox...ipkg package

2 - hook_pre_init.sh

  • Modificate stuff right before "install_piratebox.sh part2" is called
  • is called once during init-phase
  • is called after openwrt init-step

3 - hook_post_init.sh

  • Runs right after "install_piratebox.sh part2" is called
  • is called once during init-phase
  • is called after "install_piratebox.sh part2"

A - hook_piratebox_start.sh

  • Runs on every startup after
  • Runs before anything is done

B - hook_piratebox_start_done.sh

  • Runs on every startup after
  • Runs after anything is done

C - hook_piratebox_stop.sh

  • Runs on every stop
  • Runs before stopping piratebox stuff

D - hook_piratebox_stop_done.sh

  • Runs on every stop
  • Runs after stopping piratebox stuff