Set PATH before call pbi related binaries
Add {} between variables inside quotes
Use php function to get hostname instead of exec()
Add {} between variables inside quotes
Use php function to get hostname instead of exec()
Simplify logic
Add path for sysctl, also use -n param instead of awk
Use php function to get hostname instead of exec()
Add escapeshellarg() calls on exec parameters. While I'm here, replace some exec() calls by php functions like symlink, copy, unlink, mkdir
Fix an obvious typo on var name
Add escapeshellarg() calls on exec parameters. While I'm here, replace some exec() calls by php functions like symlink, copy, unlink, mkdir