diff options
Diffstat (limited to 'config/Fit123')
-rw-r--r-- | config/Fit123/fit123.inc | 28 | ||||
-rw-r--r-- | config/Fit123/fit123.xml | 5 |
2 files changed, 13 insertions, 20 deletions
diff --git a/config/Fit123/fit123.inc b/config/Fit123/fit123.inc index 30c39b37..fb3ed8d4 100644 --- a/config/Fit123/fit123.inc +++ b/config/Fit123/fit123.inc @@ -1,23 +1,21 @@ <?php function Fit123_install_deinstall() { - conf_mount_rw();
+ conf_mount_rw(); config_lock(); exec("cd .."); exec("rm -d -R /usr/local/pkg/Fit123"); - conf_mount_ro();
+ conf_mount_ro(); config_unlock(); } function Fit123_install_config() { - conf_mount_rw();
+ conf_mount_rw(); config_lock(); exec("cd .."); //Adding new themes exec("tar -zxovf /usr/local/pkg/code-red.tar.gz"); exec("mv code-red /usr/local/www/themes/code-red"); - exec("tar -zxovf /usr/local/pkg/pfsense_ng.tar.gz"); - exec("mv pfsense\ ng /usr/local/www/themes/pfsense\ ng"); //Creating backup directory exec("mkdir /usr/local/pkg/Fit123"); exec("mkdir /usr/local/pkg/Fit123/backup"); @@ -53,21 +51,21 @@ function Fit123_install_config() { //DNS Server adds option for a 3th and 4th DNS Server exec("mkdir /usr/local/pkg/Fit123/dnssrv"); exec("fetch -o /usr/local/pkg/Fit123/dnssrv/system.php http://www.pfsense.com/packages/config/Fit123/bin/dnssrv/system.abc"); - conf_mount_ro();
+ conf_mount_ro(); config_unlock(); } function Fit123_config() { global $config; - $adddate = $config['installedpackages']['fit123']['config'][0]['adddate'];
+ $adddate = $config['installedpackages']['fit123']['config'][0]['adddate']; if($adddate) - exec("cp /usr/local/pkg/Fit123/date/index.php /usr/local/www/index.php");
+ exec("cp /usr/local/pkg/Fit123/date/index.php /usr/local/www/index.php"); else - exec("cp /usr/local/pkg/Fit123/backup/index.php /usr/local/www/index.php");
+ exec("cp /usr/local/pkg/Fit123/backup/index.php /usr/local/www/index.php"); - $cpaddon = $config['installedpackages']['fit123']['config'][0]['cpaddon'];
- if($cpaddon){
+ $cpaddon = $config['installedpackages']['fit123']['config'][0]['cpaddon']; + if($cpaddon){ exec("cp /usr/local/pkg/Fit123/cpaddon/filter.inc /etc/inc/filter.inc"); exec("cp /usr/local/pkg/Fit123/cpaddon/services_captiveportal.php /usr/local/www/services_captiveportal.php"); } @@ -77,12 +75,12 @@ global $config; exec("cp /usr/local/pkg/Fit123/backup/services_captiveportal.php /usr/local/www/services_captiveportal.php"); } - $ltsp = $config['installedpackages']['fit123']['config'][0]['ltsp'];
+ $ltsp = $config['installedpackages']['fit123']['config'][0]['ltsp']; if($ltsp){ exec("cp /usr/local/pkg/Fit123/LTSP/services.inc /etc/inc/services.inc"); exec("cp /usr/local/pkg/Fit123/LTSP/services_dhcp.php /usr/local/www/services_dhcp.php"); } - else
+ else { exec("cp /usr/local/pkg/Fit123/backup/services.inc /etc/inc/services.inc"); exec("cp /usr/local/pkg/Fit123/backup/services_dhcp.php /usr/local/www/services_dhcp.php"); @@ -94,9 +92,9 @@ global $config; else $config['system']['afterfilterchangeshellcmd'] = ""; - $dnssrv = $config['installedpackages']['fit123']['config'][0]['dnssrv'];
+ $dnssrv = $config['installedpackages']['fit123']['config'][0]['dnssrv']; if($dnssrv) - exec("cp /usr/local/pkg/Fit123/dnssrv/system.php /usr/local/www/system.php");
+ exec("cp /usr/local/pkg/Fit123/dnssrv/system.php /usr/local/www/system.php"); else exec("cp /usr/local/pkg/Fit123/backup/system.php /usr/local/www/system.php"); } diff --git a/config/Fit123/fit123.xml b/config/Fit123/fit123.xml index 4d552d9b..b2f26358 100644 --- a/config/Fit123/fit123.xml +++ b/config/Fit123/fit123.xml @@ -42,11 +42,6 @@ <chmod>0644</chmod> <item>http://www.pfsense.com/packages/config/Fit123/bin/theme/code-red.tar.gz</item> </additional_files_needed> - <additional_files_needed> - <prefix>/usr/local/pkg/</prefix> - <chmod>0644</chmod> - <item>http://www.pfsense.com/packages/config/Fit123/bin/theme/pfsense_ng.tar.gz</item> - </additional_files_needed> <fields> <field> <fielddescr>Date</fielddescr> |