Before everything, please note:
- This is a tech doc only for Pros. Incorrect scripting may cause system corruption that you may have to reset factory default or even reflash the disk.
- This is for Firewalla Gold only.
- This is for version 1.971 or above
Customized Scripts
You can add some scripts to Gold so that it can be automatically executed when Firewalla service restarts (for example, when Gold reboots or software updates).
These scripts can be placed under this folder: (create this folder if not exists)
/home/pi/.firewalla/config/post_main.d/
Any files ending with ".sh" will be executed. For example:
/home/pi/.firewalla/config/post_main.d/hello.sh
Note: please make sure your scripts can be executed multiple times at unscheduled time because it will be called every time Firewalla service restarts.
Examples: Install package "iftop"
sudo apt-get update
sudo apt-get install iftop -y
Customized Cronjobs
To create scheduled jobs, you may add your own cronjob by putting cronjob expression in this file. It will be incorporated to the system crontab when Firewalla service restarts.
/home/pi/.firewalla/config/user_crontab
Example:
pi@firewalla:~ (Firewalla) $ cat ~/.firewalla/config/user_crontab
* * * * * /bin/bash -c "date" &> /tmp/date.log
You can verify if it's incorporated by running "crontab -l"
Examples: TBD
Comments
0 comments
Please sign in to leave a comment.