Sorry to dig up an old thread, but after a Google search, this thread seemed the most relevant to what I was looking to do, and may be a good start to helping anyone else looking to do the same.
Currently it just adds a 'Disable ACB' checkbox to the Settings tab of 'Diagnostics: Auto Configuration Backup', and skips uploading the config if that's set (not too sure if that's the best way, but it works for now).
Tested with AutoConfigBackup 1.28.
It needs two patches. (can you change multiple files in the same patch?)
Fields not listed can be left at the default of a new patch.
add new patch.
Description: autoconfigbackup.xml - disable ACB
Patch contents:
*** /usr/local/pkg/autoconfigbackup.xml.orig
--- /usr/local/pkg/autoconfigbackup.xml
***************
*** 132,137 ****
--- 132,143 ----
<fieldname>crypto_password2</fieldname>
<type>password</type>
+ <field>+ <fielddescr>Disable ACB</fielddescr>
+ <description>+ <fieldname>disable_autoconfigbackup</fieldname>
+ <type>checkbox</type>
+</description></field>
<custom_php_validation_command>
custom_php_validation_command($_POST, $input_errors);</custom_php_validation_command>
add new patch.
Description: autoconfigbackup.inc - disable ACB
Patch contents:
*** /usr/local/pkg/autoconfigbackup.inc.orig
--- /usr/local/pkg/autoconfigbackup.inc
***************
*** 139,144 ****
--- 139,149 ----
if($g['booting'])
return;
+ if ($config['installedpackages']['autoconfigbackup']['config'][0]['disable_autoconfigbackup'] == "on") {
+ log_error(gettext("AutoConfigBackup: Config not uploaded - ACB is disabled."));
+ return;
+ }
+
/*
* pfSense upload config to pfSense.org script
* This file plugs into config.inc (/usr/local/pkg/parse_config)
It needs two patches. (can you change multiple files in the same patch?)
Seems you can.
add new patch.
Description: Disable ACB
Patch contents:
diff
*** /usr/local/pkg/autoconfigbackup.inc.orig
--- /usr/local/pkg/autoconfigbackup.inc
***************
*** 139,144 ****
--- 139,149 ----
if($g['booting'])
return;
+ if ($config['installedpackages']['autoconfigbackup']['config'][0]['disable_autoconfigbackup'] == "on") {
+ log_error(gettext("AutoConfigBackup: Config not uploaded - ACB is disabled."));
+ return;
+ }
+
/*
* pfSense upload config to pfSense.org script
* This file plugs into config.inc (/usr/local/pkg/parse_config)
diff
*** /usr/local/pkg/autoconfigbackup.xml.orig
--- /usr/local/pkg/autoconfigbackup.xml
***************
*** 132,137 ****
--- 132,143 ----
<fieldname>crypto_password2</fieldname>
<type>password</type>
+ <field>+ <fielddescr>Disable ACB</fielddescr>
+ <description>+ <fieldname>disable_autoconfigbackup</fieldname>
+ <type>checkbox</type>
+</description></field>
<custom_php_validation_command>
custom_php_validation_command($_POST, $input_errors);</custom_php_validation_command>