2ab6f7caa2
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1398 2a923420-c742-0410-a762-8d5b09965624
26 lines
444 B
Plaintext
Executable File
26 lines
444 B
Plaintext
Executable File
#!/mod/bin/jimsh
|
|
|
|
package require cgi
|
|
source /mod/webif/lib/setup
|
|
|
|
set dir /mod/var/backup
|
|
|
|
httpheader
|
|
|
|
set file [file tail [cgi_get restore_file]]
|
|
if {$file == 0} {
|
|
puts "No filename supplied."
|
|
exit
|
|
}
|
|
|
|
set ffile "/$dir/$file.rbk"
|
|
|
|
if {![file exists $ffile]} {
|
|
puts "Backup file <i>$file</i> does not exist."
|
|
} elseif {[catch { file delete $ffile } msg]} {
|
|
puts "Deletion failed: $msg"
|
|
} else {
|
|
puts "Successfully deleted <i>$file</i>"
|
|
}
|
|
|