aboutsummaryrefslogtreecommitdiffstats
path: root/config/tftp/tftp.inc
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-06-13 15:01:06 -0600
committermcrane <mctch@yahoo.com>2009-06-13 15:02:26 -0600
commit7e7fb10565a04e82c507d83ddaa0061c725cb294 (patch)
tree34e832d3cd1ab73e4bbd733548b8af92132e0dcc /config/tftp/tftp.inc
parentd3eaa1837b5e99e8377658b7bc48a29abd7ac15c (diff)
downloadpfsense-packages-7e7fb10565a04e82c507d83ddaa0061c725cb294.tar.gz
pfsense-packages-7e7fb10565a04e82c507d83ddaa0061c725cb294.tar.bz2
pfsense-packages-7e7fb10565a04e82c507d83ddaa0061c725cb294.zip
Backup and TFTP package change backup directory to /root/backup/
Diffstat (limited to 'config/tftp/tftp.inc')
-rw-r--r--config/tftp/tftp.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/config/tftp/tftp.inc b/config/tftp/tftp.inc
index 40aed550..a6d91af9 100644
--- a/config/tftp/tftp.inc
+++ b/config/tftp/tftp.inc
@@ -118,6 +118,11 @@ function php_install_command()
// Create the tftp directory
exec("mkdir /usr/local/www/packages/tftp");
}
+
+ if (!is_dir('/root/backup/')) {
+ // Create the backup directory
+ exec("mkdir /root/backup/");
+ }
//rename PHP files from .tmp to .php
@@ -225,8 +230,8 @@ function php_install_command()
$filename = 'tftp.bak.tgz';
//extract a specific directory to /usr/local/freeswitch
- if (file_exists('/tmp/'.$filename)) {
- system('cd /; tar xvpfz /tmp/tftp.bak.tgz');
+ if (file_exists('/root/backup/'.$filename)) {
+ system('cd /; tar xvpfz /root/backup/tftp.bak.tgz');
system('chmod -R 744 /tftpboot/*');
unset($filename);
}