From 45169eeb1a0b3cb8da0dd26f9d15601310ea5fec Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 6 Oct 2008 00:40:18 +0000 Subject: Adding package for BSD Perimeter pfSense auto configuration backup. This will be free for any portal.pfsense.org subscriber. --- packages/autoconfigbackup/autoconfigbackup.xml | 91 ++++++++++++++++++++++ packages/autoconfigbackup/upload_config_filter.php | 36 +++++++++ 2 files changed, 127 insertions(+) create mode 100644 packages/autoconfigbackup/autoconfigbackup.xml create mode 100644 packages/autoconfigbackup/upload_config_filter.php (limited to 'packages/autoconfigbackup') diff --git a/packages/autoconfigbackup/autoconfigbackup.xml b/packages/autoconfigbackup/autoconfigbackup.xml new file mode 100644 index 00000000..53fce7c1 --- /dev/null +++ b/packages/autoconfigbackup/autoconfigbackup.xml @@ -0,0 +1,91 @@ + + + + + + + + Automatically backs up your pfSense configuration. All contents are encrypted on the server. Requires pfSense Premium Support Portal Subscription from http://portal.pfsense.org + pfSense Premium Support Portal + autoconfigbackup + 1.0 + Diagnostics: Auto Configuration Backup + Change + pkg_edit.php?xml=autoconfigbackup.xml&id=0 + + autoconfigbackup Settings + Set autoconfigbackup settings such as password and port. +
Diagnostics
+ /pkg_edit.php?xml=autoconfigbackup.xml&id=0 +
+ + + autoconfigbackup Settings + /pkg_edit.php?xml=autoconfigbackup.xml&id=0 + + + + Restore + /autoconfigbackup.php + + + + + autoconfigbackup Subscription Username + input + Enter the username for the Automatic Configuration Backup Web GUI. Minimum 5 characters. + password + + + + autoconfigbackup Subscription Password + password + Enter the password for the Automatic Configuration Backup Web GUI. Minimum 5 characters. + password + + + autoconfigbackup Password AGAIN + passwordagain + password + + + + + + + + + + + + +
diff --git a/packages/autoconfigbackup/upload_config_filter.php b/packages/autoconfigbackup/upload_config_filter.php new file mode 100644 index 00000000..a6e58c4c --- /dev/null +++ b/packages/autoconfigbackup/upload_config_filter.php @@ -0,0 +1,36 @@ + $last_config_change) { + + $hostname = $config['system']['hostname']; + $username = $config['installedpackages']['pfSautoconfigbackup']['config']['username']; + $password = $config['installedpackages']['pfSautoconfigbackup']['config']['password']; + $reason = $config['revision']['description']; + + $upload_url = "https://{$username}:{$password}@portal.pfsense.org/pfSconfigbackups/backup.php"; + + $curl_Session = curl_init($upload_url); + curl_setopt ($curl_Session, CURLOPT_POST, 1); + curl_setopt ($curl_Session, CURLOPT_POSTFIELDS, "reason={$reason}&configxml={$configxml}&hostname={$hostname}"); + curl_setopt ($curl_Session, CURLOPT_FOLLOWLOCATION, 1); + curl_exec ($curl_Session); + curl_close ($curl_Session); + +} + +?> \ No newline at end of file -- cgit v1.2.3