aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/backup/backup.inc29
-rw-r--r--config/backup/backup.php (renamed from config/backup/backup.tmp)0
-rw-r--r--config/backup/backup.xml13
-rwxr-xr-xconfig/backup/backup_edit.php (renamed from config/backup/backup_edit.tmp)0
4 files changed, 7 insertions, 35 deletions
diff --git a/config/backup/backup.inc b/config/backup/backup.inc
index b10fceb8..df508775 100644
--- a/config/backup/backup.inc
+++ b/config/backup/backup.inc
@@ -78,40 +78,15 @@ function backup_install_command()
global $config;
conf_mount_rw();
- if (!is_dir('/usr/local/www/packages/')) {
- exec("mkdir /usr/local/www/packages/");
- }
-
- if (!is_dir('/usr/local/www/packages/backup/')) {
- exec("mkdir /usr/local/www/packages/backup/");
- }
-
//create the backup directory
if (!is_dir('/root/backup/')) {
- exec("mkdir /root/backup/");
+ @mkdir("/root/backup/");
}
- //rename PHP files from .tmp to .php
- exec("cp /tmp/backup.tmp /usr/local/www/packages/backup/backup.php");
- unlink_if_exists("/tmp/backup.tmp");
-
- exec("cp /tmp/backup_edit.tmp /usr/local/www/packages/backup/backup_edit.php");
- unlink_if_exists("/tmp/backup_edit.tmp");
-
backup_sync_package();
conf_mount_ro();
}
-
-function backup_deinstall_command()
-{
- conf_mount_rw();
- unlink_if_exists("/usr/local/pkg/backup.xml");
- unlink_if_exists("/usr/local/pkg/backup.inc");
- exec("rm /usr/local/www/packages/backup/");
- conf_mount_ro();
-}
-
-?> \ No newline at end of file
+?>
diff --git a/config/backup/backup.tmp b/config/backup/backup.php
index 3cada9b3..3cada9b3 100644
--- a/config/backup/backup.tmp
+++ b/config/backup/backup.php
diff --git a/config/backup/backup.xml b/config/backup/backup.xml
index 1ed9c46e..ae1adf52 100644
--- a/config/backup/backup.xml
+++ b/config/backup/backup.xml
@@ -75,14 +75,14 @@
<item>https://packages.pfsense.org/packages/config/backup/backup.inc</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/tmp/</prefix>
+ <prefix>/usr/local/www/packages/backup/</prefix>
<chmod>0755</chmod>
- <item>https://packages.pfsense.org/packages/config/backup/backup.tmp</item>
+ <item>https://packages.pfsense.org/packages/config/backup/backup.php</item>
</additional_files_needed>
<additional_files_needed>
- <prefix>/tmp/</prefix>
+ <prefix>/usr/local/www/packages/backup/</prefix>
<chmod>0755</chmod>
- <item>https://packages.pfsense.org/packages/config/backup/backup_edit.tmp</item>
+ <item>https://packages.pfsense.org/packages/config/backup/backup_edit.php</item>
</additional_files_needed>
<fields>
<field>
@@ -109,7 +109,4 @@
<custom_php_install_command>
backup_install_command();
</custom_php_install_command>
- <custom_php_deinstall_command>
- backup_deinstall_command();
- </custom_php_deinstall_command>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/config/backup/backup_edit.tmp b/config/backup/backup_edit.php
index c7dbc38a..c7dbc38a 100755
--- a/config/backup/backup_edit.tmp
+++ b/config/backup/backup_edit.php