From finnarne-guest at alioth.debian.org Tue Apr 10 20:06:28 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 10 20:06:29 2007 Subject: [slbackup-commit] CVS update: slbackup-php - Imported sources Message-ID: User: finnarne-guest Date: 07/04/10 20:06:28 Log: Initial revision Status: Vendor Tag: bzz_startup Release Tags: preliminary N slbackup-php/mypass.sh N slbackup-php/index.php No conflicts created by this import From finnarne-guest at alioth.debian.org Wed Apr 11 12:37:56 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 11 12:37:57 2007 Subject: [slbackup-commit] CVS update: slbackup-php index.php Message-ID: User: finnarne-guest Date: 07/04/11 12:37:56 Modified: . index.php Log: Define some variables to easier change configuration during development Revision Changes Path 1.2 +15 -2 slbackup-php/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- index.php 10 Apr 2007 20:06:28 -0000 1.1 +++ index.php 11 Apr 2007 12:37:55 -0000 1.2 @@ -1,5 +1,11 @@ \n") ; printf ("\n") ; printf ("%s\n", _("SLBackup Configuration")) ; @@ -9,10 +15,16 @@ $passwd = $_POST["Passwd"] ; $client = $_POST["client"] ; +printf ("
") ; 
  +print_r ($_SERVER) ; 
  +printf ("
") ; + switch ($action) { case "read": if (! empty ($passwd)) { - $cmd = 'ssh -o StrictHostKeyChecking=no root@localhost cat /etc/slbackup/slbackup.conf' ; + $cmd = sprintf ("ssh %s %s@%s cat %s", + $ssh_options, $backupuser, + $backuphost, $backupconf) ; break ; } default: @@ -85,7 +97,7 @@ fclose ($pipes[1]) ; proc_close ($proc) ; ?> -
+

@@ -114,6 +126,7 @@
+ "> User: finnarne-guest Date: 07/04/11 12:52:17 Modified: . index.php Log: Some cleanup Revision Changes Path 1.3 +22 -16 slbackup-php/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- index.php 11 Apr 2007 12:37:55 -0000 1.2 +++ index.php 11 Apr 2007 12:52:17 -0000 1.3 @@ -6,17 +6,21 @@ $backupconf="/etc/slbackup/slbackup.conf" ; $ssh_options="-o StrictHostKeyChecking=no" ; +# Fetch arguments passed as the script is executed +$action = $_POST["Action"] ; +$passwd = $_POST["Passwd"] ; +$client = $_POST["client"] ; + +# fetch script to use whith passing the ssh-password +$ssh_askpass = sprintf ("%s/mypass.sh", dirname ($_SERVER["SCRIPT_FILENAME"])); + printf ("\n") ; printf ("\n") ; printf ("%s\n", _("SLBackup Configuration")) ; printf ("\n") ; printf ("\n") ; -$action = $_POST["Action"] ; -$passwd = $_POST["Passwd"] ; -$client = $_POST["client"] ; printf ("
") ; 
  -print_r ($_SERVER) ; 
   printf ("
") ; switch ($action) { @@ -27,26 +31,28 @@ $backuphost, $backupconf) ; break ; } - default: - printf ("\n") ; - printf ("\n") ; - printf (_("To read the configuration, you must log in as root on the backup-server.
")) ; - printf (_("Please enter the password for the root account at the backup server:
")) ; - printf ("
\n") ; - printf ("\n", _("Login")) ; - printf ("\n", _("Reset")) ; - printf ("") ; - break ; } -if (empty ($cmd)) +# if no cmd is provided, show loginform +if (empty ($cmd)) { + printf ("
\n") ; + printf ("\n") ; + printf (_("To read the configuration, you must log in as %s on %s.
"), + $backupuser, $backuphost) ; + printf (_("Please enter the password for the %s account on %s:
"), + $backupuser, $backuphost) ; + printf ("
\n") ; + printf ("\n", _("Login")) ; + printf ("\n", _("Reset")) ; + printf ("
") ; return ; +} $desc[0] = array ("pipe", "r") ; $desc[1] = array ("pipe", "w") ; $desc[2] = array ("file", "/tmp/error.log", "a") ; -$env = array ('SSH_ASKPASS' => '/home/finnarne/MYCVS/slbackup/slbackup-php/mypass.sh', +$env = array ('SSH_ASKPASS' => $ssh_askpass, 'DISPLAY' => ':nowhere') ; $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; if (is_resource ($proc)) { From finnarne-guest at alioth.debian.org Wed Apr 11 12:59:23 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 11 12:59:24 2007 Subject: [slbackup-commit] CVS update: slbackup-php index.php Message-ID: User: finnarne-guest Date: 07/04/11 12:59:23 Modified: . index.php Log: Dont use get when sending a password :( (but it was only for testing) Align buttons instead of trying to align with blanks Revision Changes Path 1.4 +2 -6 slbackup-php/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- index.php 11 Apr 2007 12:52:17 -0000 1.3 +++ index.php 11 Apr 2007 12:59:22 -0000 1.4 @@ -103,7 +103,7 @@ fclose ($pipes[1]) ; proc_close ($proc) ; ?> -
+

@@ -212,12 +212,8 @@ ?> - + - - - -
  
  
  
  
From finnarne-guest at alioth.debian.org Wed Apr 11 13:52:10 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 11 13:52:12 2007 Subject: [slbackup-commit] CVS update: slbackup-php index.php Message-ID: User: finnarne-guest Date: 07/04/11 13:52:10 Modified: . index.php Log: Better handling of passed values Use only one form Revision Changes Path 1.5 +53 -50 slbackup-php/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- index.php 11 Apr 2007 12:59:22 -0000 1.4 +++ index.php 11 Apr 2007 13:52:10 -0000 1.5 @@ -7,47 +7,53 @@ $ssh_options="-o StrictHostKeyChecking=no" ; # Fetch arguments passed as the script is executed -$action = $_POST["Action"] ; -$passwd = $_POST["Passwd"] ; -$client = $_POST["client"] ; +foreach ($_POST as $key => $value) { + switch ($key) { + case "Passwd": + $passwd = $value ; + break ; + case "server": + case "chooseclient": + case "clientconfig": + case "addclient": + $submit=$key ; + break ; + case "client": + $client=htmlspecialchars(trim($value)) ; + break ; + default: + $newconf[$key] = htmlspecialchars(trim($value)) ; + break ; + } +} # fetch script to use whith passing the ssh-password $ssh_askpass = sprintf ("%s/mypass.sh", dirname ($_SERVER["SCRIPT_FILENAME"])); printf ("\n") ; printf ("\n") ; -printf ("%s\n", _("SLBackup Configuration")) ; +printf ("SLBackup Configuration\n") ; printf ("\n") ; printf ("\n") ; -printf ("
") ; 
  -printf ("
") ; -switch ($action) { - case "read": - if (! empty ($passwd)) { - $cmd = sprintf ("ssh %s %s@%s cat %s", - $ssh_options, $backupuser, - $backuphost, $backupconf) ; - break ; - } -} - -# if no cmd is provided, show loginform -if (empty ($cmd)) { - printf ("\n") ; - printf ("\n") ; - printf (_("To read the configuration, you must log in as %s on %s.
"), +if (empty ($passwd)) { + printf ("\n") ; + printf ("To read the configuration, you must log in as %s on %s.
", $backupuser, $backuphost) ; - printf (_("Please enter the password for the %s account on %s:
"), + printf ("Please enter the password for the %s account on %s:
", $backupuser, $backuphost) ; printf ("
\n") ; - printf ("\n", _("Login")) ; - printf ("\n", _("Reset")) ; - printf ("") ; + printf ("\n") ; + printf ("\n") ; + printf ("") ; return ; } +$cmd = sprintf ("ssh %s %s@%s cat %s", + $ssh_options, $backupuser, + $backuphost, $backupconf) ; + $desc[0] = array ("pipe", "r") ; $desc[1] = array ("pipe", "w") ; $desc[2] = array ("file", "/tmp/error.log", "a") ; @@ -103,8 +109,9 @@ fclose ($pipes[1]) ; proc_close ($proc) ; ?> -
-

+ + +

Server info

@@ -132,20 +139,15 @@
Address
- - "> + "> + value="Reset">
- - -
-

-
+

Client info

Client: - - -"> -
-
+ @@ -189,16 +187,16 @@ - - + + - +
Address
- "> + "> + value="reset">
Locations:
@@ -212,13 +210,18 @@ ?>
- - -
+ ") ; +print_r (array ('submit' => $submit, + 'client' => $client, + 'newconf' => $newconf)) ; +printf ("") ; + ?> From finnarne-guest at alioth.debian.org Wed Apr 11 14:21:38 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 11 14:21:39 2007 Subject: [slbackup-commit] CVS update: slbackup-php index.php Message-ID: User: finnarne-guest Date: 07/04/11 14:21:38 Modified: . index.php Log: Tried to clean up a bit the
Servertype - + User @@ -160,6 +170,8 @@ ?> + + @@ -176,8 +188,15 @@ - + - +
Address
Clienttype - "> + User @@ -196,7 +215,7 @@
Locations:
@@ -210,7 +229,7 @@ ?>
@@ -221,7 +240,8 @@ printf ("
") ; 
   print_r (array ('submit' => $submit, 
                   'client' => $client,
  -                'newconf' => $newconf)) ; 
  +                'newconf' => $newconf,
  +                'config' => $config)) ; 
   printf ("
") ; ?> From finnarne-guest at alioth.debian.org Wed Apr 11 16:44:17 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 11 16:44:18 2007 Subject: [slbackup-commit] CVS update: slbackup-php index.php Message-ID: User: finnarne-guest Date: 07/04/11 16:44:17 Modified: . index.php Log: Moved the reading of config-file into a separate function, to avoid conflicts in variable names, and to make it easier to duplicate things into writeconf :) Revision Changes Path 1.7 +84 -62 slbackup-php/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- index.php 11 Apr 2007 14:21:38 -0000 1.6 +++ index.php 11 Apr 2007 16:44:17 -0000 1.7 @@ -1,10 +1,78 @@ $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while (fscanf ($pipes[1], "\t%s\t%s", $key, $value)) { + if (isset ($value)) { + switch (strtolower($key)) { + case "address": + case "keep": + case "type": + case "user": + $clientconf[$key] = $value ; + break ; + case "location": + $clientconf[$key][] = $value ; + break ; + case "server_address": + case "server_destdir": + case "server_type": + case "server_user": + $config[$key] = $value ; + break ; + } + } else { + switch ($key) { + case "": + $readclient = true ; + break ; + case "": + $readclient = false ; + break ; + default: + if ($readclient && empty ($newclient)) { + $newclient = trim ($key, "<>") ; + $clientconf = array () ; + } elseif ($readclient && $key == "") { + $config["client"][$newclient] = $clientconf ; + unset ($newclient) ; + unset ($clientconf) ; + } + break ; + } + } + unset ($value) ; + unset ($key) ; + } + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + return $config ; +} + # Define some variables to easier change configuration during development $backuphost="localhost" ; $backupuser="root" ; $backupconf="/etc/slbackup/slbackup.conf" ; $ssh_options="-o StrictHostKeyChecking=no" ; +# fetch script to use whith passing the ssh-password +$ssh_askpass = sprintf ("%s/mypass.sh", dirname ($_SERVER["SCRIPT_FILENAME"])); + # Fetch arguments passed as the script is executed foreach ($_POST as $key => $value) { @@ -30,8 +98,6 @@ } } -# fetch script to use whith passing the ssh-password -$ssh_askpass = sprintf ("%s/mypass.sh", dirname ($_SERVER["SCRIPT_FILENAME"])); printf ("\n") ; printf ("\n") ; @@ -40,7 +106,10 @@ printf ("\n") ; -if (empty ($passwd)) { +if (isset ($passwd)) + $config = readconf ($passwd) ; + +if (empty ($config)) { printf ("
\n") ; printf ("To read the configuration, you must log in as %s on %s.
", $backupuser, $backuphost) ; @@ -53,64 +122,18 @@ return ; } -$cmd = sprintf ("ssh %s %s@%s cat %s", - $ssh_options, $backupuser, - $backuphost, $backupconf) ; - -$desc[0] = array ("pipe", "r") ; -$desc[1] = array ("pipe", "w") ; -$desc[2] = array ("file", "/tmp/error.log", "a") ; - -$env = array ('SSH_ASKPASS' => $ssh_askpass, - 'DISPLAY' => ':nowhere') ; -$proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; -if (is_resource ($proc)) { - fprintf ($pipes[0], "%s\n", $passwd) ; - fclose ($pipes[0]) ; - while (fscanf ($pipes[1], "\t%s\t%s", $key, $value)) { - if (isset ($value)) { - switch (strtolower($key)) { - case "address": - case "keep": - case "type": - case "user": - $clientconf[$key] = $value ; - break ; - case "location": - $clientconf[$key][] = $value ; - break ; - case "server_address": - case "server_destdir": - case "server_type": - case "server_user": - $config[$key] = $value ; - break ; - } - } else { - switch ($key) { - case "": - $readclient = true ; - break ; - case "": - $readclient = false ; - break ; - default: - if ($readclient && empty ($client)) { - $client = trim ($key, "<>") ; - $clientconf = array () ; - } elseif ($readclient && $key == "") { - $config["client"][$client] = $clientconf ; - unset ($client) ; - unset ($clientconf) ; - } - break ; - } - } - unset ($value) ; - unset ($key) ; - } - fclose ($pipes[1]) ; - proc_close ($proc) ; +switch ($submit) { + case "addloc": + if (empty ($newconf["newloc"])) + break ; + if (in_array ($newconf["newloc"], + $config["client"][$client]["location"])) + break ; + printf ("Trying to add %s to the locations of %s
\n", + $newconf["newloc"], $client) ; + $config["client"][$client]["location"][] = $newconf["newloc"] ; + break ; +} ?> @@ -234,7 +257,6 @@
") ; From finnarne-guest at alioth.debian.org Wed Apr 11 22:01:16 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 11 22:01:18 2007 Subject: [slbackup-commit] CVS update: slbackup-php index.php Message-ID: User: finnarne-guest Date: 07/04/11 22:01:16 Modified: . index.php Log: Now writing of config also works, and the display is kind of nice Revision Changes Path 1.8 +113 -21 slbackup-php/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- index.php 11 Apr 2007 16:44:17 -0000 1.7 +++ index.php 11 Apr 2007 22:01:16 -0000 1.8 @@ -1,5 +1,45 @@ \n") ; + foreach ($config["clients"] as $key => $value) { + $out .= sprintf (" <%s>\n", $key) ; + $out .= sprintf (" address %s\n", $value["address"]) ; + $out .= sprintf (" keep %s\n", $value["keep"]) ; + foreach ($value["location"] as $loc) + $out .= sprintf (" location %s\n", $loc) ; + $out .= sprintf (" type %s\n", $value["type"]) ; + $out .= sprintf (" user %s\n", $value["user"]) ; + $out .= sprintf (" \n", $key) ; + } + $out .= sprintf ("\n") ; + $out .= sprintf ("server_address %s\n", $config["server_address"]) ; + $out .= sprintf ("server_destdir %s\n", $config["server_destdir"]) ; + $out .= sprintf ("server_type %s\n", $config["server_type"]) ; + $out .= sprintf ("server_user %s\n", $config["server_user"]) ; + + $cmd = sprintf ("ssh %s %s@%s 'cat > %s'", + $ssh_options, $backupuser, + $backuphost, $backupconf) ; + + $desc[0] = array ("pipe", "r") ; + $desc[1] = array ("pipe", "w") ; + $desc[2] = array ("file", "/tmp/error.log", "a") ; + + $env = array ('SSH_ASKPASS' => $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fprintf ($pipes[0], "%s\n", $out) ; + fclose ($pipes[1]) ; + fclose ($pipes[0]) ; + proc_close ($proc) ; + } +} + function readconf ($passwd) { global $backuphost, $backupuser, $backupconf, $ssh_options, $ssh_askpass ; @@ -48,8 +88,9 @@ if ($readclient && empty ($newclient)) { $newclient = trim ($key, "<>") ; $clientconf = array () ; + $clientconf["location"] = array () ; } elseif ($readclient && $key == "") { - $config["client"][$newclient] = $clientconf ; + $config["clients"][$newclient] = $clientconf ; unset ($newclient) ; unset ($clientconf) ; } @@ -66,7 +107,7 @@ } # Define some variables to easier change configuration during development -$backuphost="localhost" ; +$backuphost="backup" ; $backupuser="root" ; $backupconf="/etc/slbackup/slbackup.conf" ; $ssh_options="-o StrictHostKeyChecking=no" ; @@ -123,15 +164,72 @@ } switch ($submit) { + case "server": + foreach (array ("server_address", "server_destdir", "server_user", "server_type") as $key) { + if ($newconf[$key] <> $config[$key]) { + $changed = true ; + $config[$key] = $newconf[$key] ; + } + } + if ($changed) + writeconf ($passwd, $config) ; + break ; + case "delclient": + if (empty ($client)) { + printf ("No client specified :(
\n") ; + break ; + } + $pos = array_search($client, array_keys ($config["clients"])) ; + if ($pos === false) + printf ("Unable to find %s in the list of clients
\n", + $client) ; + else { + array_splice ($config["clients"], + $pos,1) ; + writeconf ($passwd, $config) ; + } + unset ($client) ; + break ; + case "addclient": + $client="" ; + $config["clients"][$client]["keep"]="185" ; + $config["clients"][$client]["user"]="root" ; + break ; + case "clientconfig": + if ($client == "<new>") { + $client = $newconf["client_address"] ; + $config["clients"][$client]["location"] = array () ; + } + foreach (array ("address", "keep", "user", "type") as $key) { + if ($newconf["client_".$key] <> $config["clients"][$client][$key]) { + $changed = true ; + $config["clients"][$client][$key] = $newconf["client_" . $key] ; + } + } + if ($changed) + writeconf ($passwd, $config) ; + break ; + case "delloc": + if (empty ($newconf["location"])) + break ; + $pos = array_search ($newconf["location"], + $config["clients"][$client]["location"]) ; + if ($pos === false) + printf ("Unable to find %s in the locations of %s
\n", + $newconf["location"], $client) ; + else + array_splice ($config["clients"][$client]["location"], + $pos,1) ; + writeconf ($passwd, $config) ; + break ; case "addloc": if (empty ($newconf["newloc"])) break ; if (in_array ($newconf["newloc"], - $config["client"][$client]["location"])) + $config["clients"][$client]["location"])) break ; - printf ("Trying to add %s to the locations of %s
\n", - $newconf["newloc"], $client) ; - $config["client"][$client]["location"][] = $newconf["newloc"] ; + $config["clients"][$client]["location"][] = $newconf["newloc"] ; + writeconf ($passwd, $config) ; break ; } ?> @@ -184,7 +282,9 @@ Client: "> + value=""> Backup Age "> + value=""> @@ -216,7 +316,7 @@ foreach (array ('local', 'remote') as $value) printf ("", $value, - ($config["client"][$client]["type"] == $value ? "selected": ""), + ($config["clients"][$client]["type"] == $value ? "selected": ""), $value) ; ?> @@ -224,7 +324,7 @@ User "> + value=""> @@ -243,9 +343,9 @@ - $value) { +foreach ($config["clients"][$client][location] as $key => $value) { printf ("\n", $value, $value) ; } @@ -258,12 +358,4 @@ ") ; -print_r (array ('submit' => $submit, - 'client' => $client, - 'newconf' => $newconf, - 'config' => $config)) ; -printf ("") ; - ?> From finnarne-guest at alioth.debian.org Thu Apr 12 06:43:13 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Thu Apr 12 06:43:15 2007 Subject: [slbackup-commit] CVS update: slbackup-php index.php Message-ID: User: finnarne-guest Date: 07/04/12 06:43:13 Modified: . index.php Log: Added functionality to read cron config Revision Changes Path 1.9 +63 -5 slbackup-php/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/index.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- index.php 11 Apr 2007 22:01:16 -0000 1.8 +++ index.php 12 Apr 2007 06:43:13 -0000 1.9 @@ -1,5 +1,31 @@ $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) + $cron[] = trim ($line) ; + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + return $cron ; +} + function writeconf ($passwd, $config) { global $backuphost, $backupuser, $backupconf, $ssh_options, $ssh_askpass ; @@ -107,9 +133,10 @@ } # Define some variables to easier change configuration during development -$backuphost="backup" ; +$backuphost="localhost" ; $backupuser="root" ; $backupconf="/etc/slbackup/slbackup.conf" ; +$backupcron="/etc/cron.d/slbackup" ; $ssh_options="-o StrictHostKeyChecking=no" ; # fetch script to use whith passing the ssh-password $ssh_askpass = sprintf ("%s/mypass.sh", dirname ($_SERVER["SCRIPT_FILENAME"])); @@ -163,6 +190,8 @@ return ; } +$scheduler = readcron ($passwd) ; + switch ($submit) { case "server": foreach (array ("server_address", "server_destdir", "server_user", "server_type") as $key) { @@ -232,10 +261,39 @@ writeconf ($passwd, $config) ; break ; } +foreach ($scheduler as $line) { + if ($line[0] == "#") + continue ; + if (strpos ($line, "slbackup-cron") === false) + continue ; + $isscheduled = true ; + $array = explode (" ", $line) ; + sscanf ($array[0], "%d", $minutes) ; + sscanf ($array[1], "%d", $hours) ; +} ?>
-

Server info

+

Server scheduler

+Backup enabled +> +Run backup at + + + +

Server config

@@ -278,7 +336,7 @@
Address
-

Client info

+

Client config

Client: + + - + +

Server config

@@ -329,7 +336,7 @@ @@ -340,12 +347,10 @@ Client: From finnarne-guest at alioth.debian.org Thu Apr 12 11:15:02 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Thu Apr 12 11:15:04 2007 Subject: [slbackup-commit] CVS update: slbackup-php index.php Message-ID: User: finnarne-guest Date: 07/04/12 11:15:02 Modified: . index.php Log: addclient cleanup save scheduling config in config-array Revision Changes Path 1.11 +11 -10 slbackup-php/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/index.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- index.php 12 Apr 2007 08:59:45 -0000 1.10 +++ index.php 12 Apr 2007 11:15:02 -0000 1.11 @@ -263,39 +263,35 @@ break ; } -if ($client == "" and $submit != "addclient") { - printf ("No client %s should be selected\n", $client) ; - $client = "" ; -} foreach ($scheduler as $line) { if ($line[0] == "#") continue ; if (strpos ($line, "slbackup-cron") === false) continue ; - $isscheduled = true ; + $config["active"] = true ; $array = explode (" ", $line) ; - sscanf ($array[0], "%d", $minutes) ; - sscanf ($array[1], "%d", $hours) ; + sscanf ($array[0], "%d", $config["minutes"]) ; + sscanf ($array[1], "%d", $config["hours"]) ; } ?>

Server scheduler

Backup enabled -> +> Run backup at @@ -421,4 +417,9 @@ \n") ; + print_r ($newconf) ; + printf ("") ; +} ?> From finnarne-guest at alioth.debian.org Thu Apr 12 11:58:26 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Thu Apr 12 11:58:28 2007 Subject: [slbackup-commit] CVS update: slbackup-php index.php Message-ID: User: finnarne-guest Date: 07/04/12 11:58:26 Modified: . index.php Log: now it's able to save changes to the scheduler as well. Revision Changes Path 1.12 +71 -18 slbackup-php/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/index.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- index.php 12 Apr 2007 11:15:02 -0000 1.11 +++ index.php 12 Apr 2007 11:58:26 -0000 1.12 @@ -26,6 +26,30 @@ return $cron ; } +function writecron ($passwd, $cron) { +global $backuphost, $backupuser, $backupcron, $ssh_options, $ssh_askpass ; + + $cmd = sprintf ("ssh %s %s@%s 'cat > %s'", + $ssh_options, $backupuser, + $backuphost, $backupcron) ; + + $desc[0] = array ("pipe", "r") ; + $desc[1] = array ("pipe", "w") ; + $desc[2] = array ("file", "/tmp/error.log", "a") ; + + $env = array ('SSH_ASKPASS' => $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fprintf ($pipes[0], "%s", $cron) ; + fclose ($pipes[1]) ; + fclose ($pipes[0]) ; + proc_close ($proc) ; + } +} + + function writeconf ($passwd, $config) { global $backuphost, $backupuser, $backupconf, $ssh_options, $ssh_askpass ; @@ -193,7 +217,54 @@ $scheduler = readcron ($passwd) ; +foreach ($scheduler as $line) { + if ($line[0] == "#") + continue ; + if (strpos ($line, "slbackup-cron") === false) + continue ; + $config["active"] = true ; + $array = explode (" ", $line) ; + sscanf ($array[0], "%d", $config["minutes"]) ; + sscanf ($array[1], "%d", $config["hours"]) ; +} switch ($submit) { + case "scheduler": + $newsched = "" ; + foreach ($scheduler as $line) { + if ($line[0] == "#") + $newsched .= sprintf ("%s\n", $line) ; + elseif (strpos ($line, "slbackup-cron") === false) + $newsched .= sprintf ("%s\n", $line) ; + elseif (empty ($newconf["active"])) { + $newsched .= sprintf ("#%s\n", $line) ; + $changed = true ; + $config["active"] = false ; + } else { + if ($config["minutes"] <> $newconf ["minutes"]) + $changed = true ; + if ($config["hours"] <> $newconf ["hours"]) + $changed = true ; + if ($changed) { + $config["active"] = true ; + $config["minutes"] = $newconf ["minutes"] ; + $config["hours"] = $newconf ["hours"] ; + $newsched .= sprintf ("%02d %02d * * * root if [ -x /usr/share/slbackup/slbackup-cron -a -f /etc/slbackup/slbackup.conf ]; then /usr/share/slbackup/slbackup-cron ; fi\n", $newconf["minutes"], $newconf["hours"]) ; + } else + $newsched .= sprintf ("%s\n", $line) ; + } + } + if (!$changed and empty($config["active"]) and + $newconf["active"] == "on") { + $config["active"] = true ; + $config["minutes"] = $newconf ["minutes"] ; + $config["hours"] = $newconf ["hours"] ; + $newsched .= sprintf ("%02d %02d * * * root if [ -x /usr/share/slbackup/slbackup-cron -a -f /etc/slbackup/slbackup.conf ]; then /usr/share/slbackup/slbackup-cron ; fi\n", $newconf["minutes"], $newconf["hours"]) ; + $changed = true ; + } + if ($changed) { + writecron ($passwd, $newsched); + } + break ; case "server": foreach (array ("server_address", "server_destdir", "server_user", "server_type") as $key) { if ($newconf[$key] <> $config[$key]) { @@ -263,16 +334,6 @@ break ; } -foreach ($scheduler as $line) { - if ($line[0] == "#") - continue ; - if (strpos ($line, "slbackup-cron") === false) - continue ; - $config["active"] = true ; - $array = explode (" ", $line) ; - sscanf ($array[0], "%d", $config["minutes"]) ; - sscanf ($array[1], "%d", $config["hours"]) ; -} ?>
@@ -415,11 +476,3 @@
+ value="Update">
+ value=""? "Add": "Update") ?>">
-\n") ; - print_r ($newconf) ; - printf ("") ; -} -?> From finnarne-guest at alioth.debian.org Thu Apr 12 13:04:10 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Thu Apr 12 13:04:11 2007 Subject: [slbackup-commit] CVS update: slbackup-php/script - New directory Message-ID: User: finnarne-guest Date: 07/04/12 13:04:10 slbackup-php/script - New directory From finnarne-guest at alioth.debian.org Thu Apr 12 13:04:48 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Thu Apr 12 13:04:50 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src - New directory Message-ID: User: finnarne-guest Date: 07/04/12 13:04:48 slbackup-php/src - New directory From finnarne-guest at alioth.debian.org Thu Apr 12 13:06:07 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Thu Apr 12 13:06:09 2007 Subject: [slbackup-commit] CVS update: slbackup-php index.php mypass.sh Message-ID: User: finnarne-guest Date: 07/04/12 13:06:07 Removed: . index.php mypass.sh Log: Moved index.php to src/index.php Moved mypass.sh to script/mypass.sh From finnarne-guest at alioth.debian.org Thu Apr 12 13:06:08 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Thu Apr 12 13:06:09 2007 Subject: [slbackup-commit] CVS update: slbackup-php/script mypass.sh Message-ID: User: finnarne-guest Date: 07/04/12 13:06:08 Added: script mypass.sh Log: Moved index.php to src/index.php Moved mypass.sh to script/mypass.sh Revision Changes Path 1.1 slbackup-php/script/mypass.sh Index: mypass.sh =================================================================== #!/bin/sh read PASS cat << EOF $PASS EOF From finnarne-guest at alioth.debian.org Thu Apr 12 13:06:08 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Thu Apr 12 13:06:09 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/12 13:06:08 Added: src index.php Log: Moved index.php to src/index.php Moved mypass.sh to script/mypass.sh Revision Changes Path 1.1 slbackup-php/src/index.php Index: index.php =================================================================== $ssh_askpass, 'DISPLAY' => ':nowhere') ; $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; if (is_resource ($proc)) { fprintf ($pipes[0], "%s\n", $passwd) ; fclose ($pipes[0]) ; while ($line = fgets ($pipes[1], 1024)) $cron[] = trim ($line) ; fclose ($pipes[1]) ; proc_close ($proc) ; } return $cron ; } function writecron ($passwd, $cron) { global $backuphost, $backupuser, $backupcron, $ssh_options, $ssh_askpass ; $cmd = sprintf ("ssh %s %s@%s 'cat > %s'", $ssh_options, $backupuser, $backuphost, $backupcron) ; $desc[0] = array ("pipe", "r") ; $desc[1] = array ("pipe", "w") ; $desc[2] = array ("file", "/tmp/error.log", "a") ; $env = array ('SSH_ASKPASS' => $ssh_askpass, 'DISPLAY' => ':nowhere') ; $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; if (is_resource ($proc)) { fprintf ($pipes[0], "%s\n", $passwd) ; fprintf ($pipes[0], "%s", $cron) ; fclose ($pipes[1]) ; fclose ($pipes[0]) ; proc_close ($proc) ; } } function writeconf ($passwd, $config) { global $backuphost, $backupuser, $backupconf, $ssh_options, $ssh_askpass ; $out = sprintf ("\n") ; foreach ($config["clients"] as $key => $value) { $out .= sprintf (" <%s>\n", $key) ; $out .= sprintf (" address %s\n", $value["address"]) ; $out .= sprintf (" keep %s\n", $value["keep"]) ; foreach ($value["location"] as $loc) $out .= sprintf (" location %s\n", $loc) ; $out .= sprintf (" type %s\n", $value["type"]) ; $out .= sprintf (" user %s\n", $value["user"]) ; $out .= sprintf (" \n", $key) ; } $out .= sprintf ("\n") ; $out .= sprintf ("server_address %s\n", $config["server_address"]) ; $out .= sprintf ("server_destdir %s\n", $config["server_destdir"]) ; $out .= sprintf ("server_type %s\n", $config["server_type"]) ; $out .= sprintf ("server_user %s\n", $config["server_user"]) ; $cmd = sprintf ("ssh %s %s@%s 'cat > %s'", $ssh_options, $backupuser, $backuphost, $backupconf) ; $desc[0] = array ("pipe", "r") ; $desc[1] = array ("pipe", "w") ; $desc[2] = array ("file", "/tmp/error.log", "a") ; $env = array ('SSH_ASKPASS' => $ssh_askpass, 'DISPLAY' => ':nowhere') ; $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; if (is_resource ($proc)) { fprintf ($pipes[0], "%s\n", $passwd) ; fprintf ($pipes[0], "%s\n", $out) ; fclose ($pipes[1]) ; fclose ($pipes[0]) ; proc_close ($proc) ; } } function readconf ($passwd) { global $backuphost, $backupuser, $backupconf, $ssh_options, $ssh_askpass ; $cmd = sprintf ("ssh %s %s@%s cat %s", $ssh_options, $backupuser, $backuphost, $backupconf) ; $desc[0] = array ("pipe", "r") ; $desc[1] = array ("pipe", "w") ; $desc[2] = array ("file", "/tmp/error.log", "a") ; $env = array ('SSH_ASKPASS' => $ssh_askpass, 'DISPLAY' => ':nowhere') ; $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; if (is_resource ($proc)) { fprintf ($pipes[0], "%s\n", $passwd) ; fclose ($pipes[0]) ; while (fscanf ($pipes[1], "\t%s\t%s", $key, $value)) { if (isset ($value)) { switch (strtolower($key)) { case "address": case "keep": case "type": case "user": $clientconf[$key] = $value ; break ; case "location": $clientconf[$key][] = $value ; break ; case "server_address": case "server_destdir": case "server_type": case "server_user": $config[$key] = $value ; break ; } } else { switch ($key) { case "": $readclient = true ; break ; case "": $readclient = false ; break ; default: if ($readclient && empty ($newclient)) { $newclient = trim ($key, "<>") ; $clientconf = array () ; $clientconf["location"] = array () ; } elseif ($readclient && $key == "") { $config["clients"][$newclient] = $clientconf ; unset ($newclient) ; unset ($clientconf) ; } break ; } } unset ($value) ; unset ($key) ; } fclose ($pipes[1]) ; proc_close ($proc) ; } return $config ; } # Define some variables to easier change configuration during development $backuphost="localhost" ; $backupuser="root" ; $backupconf="/etc/slbackup/slbackup.conf" ; $backupcron="/etc/cron.d/slbackup" ; $ssh_options="-o StrictHostKeyChecking=no" ; # fetch script to use whith passing the ssh-password $ssh_askpass = sprintf ("%s/mypass.sh", dirname ($_SERVER["SCRIPT_FILENAME"])); # Fetch arguments passed as the script is executed foreach ($_POST as $key => $value) { switch ($key) { case "Passwd": $passwd = $value ; break ; case "addclient": case "server": case "chooseclient": case "delclient": case "clientconfig": case "delloc": case "addloc": case "scheduler": $submit=$key ; break ; case "client": $client=htmlspecialchars(trim($value)) ; break ; default: $newconf[$key] = htmlspecialchars(trim($value)) ; break ; } } printf ("\n") ; printf ("\n") ; printf ("SLBackup Configuration\n") ; printf ("\n") ; printf ("\n") ; if (isset ($passwd)) $config = readconf ($passwd) ; if (empty ($config)) { printf ("
\n") ; printf ("To read the configuration, you must log in as %s on %s.
", $backupuser, $backuphost) ; printf ("Please enter the password for the %s account on %s:
", $backupuser, $backuphost) ; printf ("
\n") ; printf ("\n") ; printf ("\n") ; printf ("
") ; return ; } $scheduler = readcron ($passwd) ; foreach ($scheduler as $line) { if ($line[0] == "#") continue ; if (strpos ($line, "slbackup-cron") === false) continue ; $config["active"] = true ; $array = explode (" ", $line) ; sscanf ($array[0], "%d", $config["minutes"]) ; sscanf ($array[1], "%d", $config["hours"]) ; } switch ($submit) { case "scheduler": $newsched = "" ; foreach ($scheduler as $line) { if ($line[0] == "#") $newsched .= sprintf ("%s\n", $line) ; elseif (strpos ($line, "slbackup-cron") === false) $newsched .= sprintf ("%s\n", $line) ; elseif (empty ($newconf["active"])) { $newsched .= sprintf ("#%s\n", $line) ; $changed = true ; $config["active"] = false ; } else { if ($config["minutes"] <> $newconf ["minutes"]) $changed = true ; if ($config["hours"] <> $newconf ["hours"]) $changed = true ; if ($changed) { $config["active"] = true ; $config["minutes"] = $newconf ["minutes"] ; $config["hours"] = $newconf ["hours"] ; $newsched .= sprintf ("%02d %02d * * * root if [ -x /usr/share/slbackup/slbackup-cron -a -f /etc/slbackup/slbackup.conf ]; then /usr/share/slbackup/slbackup-cron ; fi\n", $newconf["minutes"], $newconf["hours"]) ; } else $newsched .= sprintf ("%s\n", $line) ; } } if (!$changed and empty($config["active"]) and $newconf["active"] == "on") { $config["active"] = true ; $config["minutes"] = $newconf ["minutes"] ; $config["hours"] = $newconf ["hours"] ; $newsched .= sprintf ("%02d %02d * * * root if [ -x /usr/share/slbackup/slbackup-cron -a -f /etc/slbackup/slbackup.conf ]; then /usr/share/slbackup/slbackup-cron ; fi\n", $newconf["minutes"], $newconf["hours"]) ; $changed = true ; } if ($changed) { writecron ($passwd, $newsched); } break ; case "server": foreach (array ("server_address", "server_destdir", "server_user", "server_type") as $key) { if ($newconf[$key] <> $config[$key]) { $changed = true ; $config[$key] = $newconf[$key] ; } } if ($changed) writeconf ($passwd, $config) ; break ; case "delclient": if (empty ($client)) { printf ("No client specified :(
\n") ; break ; } $pos = array_search($client, array_keys ($config["clients"])) ; if ($pos === false) printf ("Unable to find %s in the list of clients
\n", $client) ; else { array_splice ($config["clients"], $pos,1) ; writeconf ($passwd, $config) ; } unset ($client) ; break ; case "addclient": $client="" ; $config["clients"][$client]["keep"]="185" ; $config["clients"][$client]["user"]="root" ; break ; case "clientconfig": if ($client == "<new>") { $client = $newconf["client_address"] ; $config["clients"][$client]["location"] = array () ; } foreach (array ("address", "keep", "user", "type") as $key) { if ($newconf["client_".$key] <> $config["clients"][$client][$key]) { $changed = true ; $config["clients"][$client][$key] = $newconf["client_" . $key] ; } } if ($changed) writeconf ($passwd, $config) ; break ; case "delloc": if (empty ($newconf["location"])) break ; $pos = array_search ($newconf["location"], $config["clients"][$client]["location"]) ; if ($pos === false) printf ("Unable to find %s in the locations of %s
\n", $newconf["location"], $client) ; else array_splice ($config["clients"][$client]["location"], $pos,1) ; writeconf ($passwd, $config) ; break ; case "addloc": if (empty ($newconf["newloc"])) break ; if (in_array ($newconf["newloc"], $config["clients"][$client]["location"])) break ; $config["clients"][$client]["location"][] = $newconf["newloc"] ; writeconf ($passwd, $config) ; break ; } ?>

Server scheduler

Backup enabled > Run backup at

Server config

Address Destdir
Servertype User

Client config

Client:
Address "> Backup Age ">
Clienttype User ">
"? "Add": "Update") ?>">
Locations:
From finnarne-guest at alioth.debian.org Thu Apr 12 13:09:22 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Thu Apr 12 13:09:23 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/12 13:09:22 Modified: src index.php Log: reflect new location of script Revision Changes Path 1.2 +2 -1 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- index.php 12 Apr 2007 13:06:08 -0000 1.1 +++ index.php 12 Apr 2007 13:09:22 -0000 1.2 @@ -163,7 +163,8 @@ $backupcron="/etc/cron.d/slbackup" ; $ssh_options="-o StrictHostKeyChecking=no" ; # fetch script to use whith passing the ssh-password -$ssh_askpass = sprintf ("%s/mypass.sh", dirname ($_SERVER["SCRIPT_FILENAME"])); +$ssh_askpass = sprintf ("%s/script/mypass.sh", + dirname (dirname ($_SERVER["SCRIPT_FILENAME"]))); # Fetch arguments passed as the script is executed From finnarne-guest at alioth.debian.org Thu Apr 12 13:10:58 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Thu Apr 12 13:11:00 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/12 13:10:58 Modified: src index.php Log: Maybe a better way to display the time Revision Changes Path 1.3 +1 -0 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- index.php 12 Apr 2007 13:09:22 -0000 1.2 +++ index.php 12 Apr 2007 13:10:58 -0000 1.3 @@ -349,6 +349,7 @@ $i, ($i == $config["minutes"] ? "selected" : ""), $i) ; ?> +:
\n") ; - printf ("\n") ; - printf ("\n") ; - printf ("") ; + $smarty->assign ('backupuser', $backupuser) ; + $smarty->assign ('backuphost', $backuphost) ; + $smarty->display ('login.tpl') ; return ; } @@ -352,147 +347,28 @@ writeconf ($passwd, $config) ; break ; } - -?> -
- -

Server scheduler

-Backup enabled -> -Run backup at - -: - - - -

Server config

- - - - - - - - - - - - - - - - - -
Address - - Destdir - -
Servertype - - User - -
- - -
-

Client config

-Client: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Address - "> - Backup Age - "> -
Clienttype - - User - "> -
- "? "Add": "Update") ?>"> - -
Locations:
- - -
-
From finnarne-guest at alioth.debian.org Fri Apr 13 06:07:39 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 06:07:40 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates config.tpl login.tpl Message-ID: User: finnarne-guest Date: 07/04/13 06:07:38 Added: templates config.tpl login.tpl Log: Rewritten to use smarty-templates Revision Changes Path 1.1 slbackup-php/templates/config.tpl Index: config.tpl =================================================================== {* slbackup-php, an administration tool for slbackup Copyright (C) 2007 Finn-Arne Johansen , Bzzware AS, Norway This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} SLBackup Configuration

Server scheduler

Backup enabled Run backup at {html_options name=minutes options=$a_minutes selected=$minutes} : {html_options name=hours options=$a_hours selected=$hours}

Server config

Address Destdir
Servertype {html_options name=server_type options=$types selected=$server_type} User

Client config

Client: {html_options name=client options=$clients selected=$client}
Address Backup Age
Clienttype {html_options name=client_type options=$types selected=$client_type} User
Locations:
1.1 slbackup-php/templates/login.tpl Index: login.tpl =================================================================== {* slbackup-php, an administration tool for slbackup Copyright (C) 2007 Finn-Arne Johansen , Bzzware AS, Norway This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} SLBackup Configuration
To read the configuration, you must log in as {$backupuser} on {$backuphost}.
Please enter the password for the {$backupuser} account on {$backuphost}:

From finnarne-guest at alioth.debian.org Fri Apr 13 06:33:19 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 06:33:20 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/13 06:33:19 Modified: src index.php Log: Display the name of the backup-clients, instead of complete arrays Revision Changes Path 1.7 +6 -2 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- index.php 13 Apr 2007 06:07:38 -0000 1.6 +++ index.php 13 Apr 2007 06:33:19 -0000 1.7 @@ -84,7 +84,7 @@ $out .= sprintf (" user %s\n", $value["user"]) ; $out .= sprintf (" \n", $key) ; } - $out .= sprintf ("\n") ; + $out .= sprintf ("\n") ; $out .= sprintf ("server_address %s\n", $config["server_address"]) ; $out .= sprintf ("server_destdir %s\n", $config["server_destdir"]) ; $out .= sprintf ("server_type %s\n", $config["server_type"]) ; @@ -363,12 +363,16 @@ $smarty->assign ('server_type', $config["server_type"]) ; $smarty->assign ('server_user', $config["server_user"]) ; $smarty->assign ('types', array ('local', 'remote')) ; - $smarty->assign ('clients', $config["clients"]) ; + $smarty->assign ('clients', array_keys($config["clients"])) ; $smarty->assign ('client', $client) ; $smarty->assign ('clientaddress', $config["clients"][$client]["address"]) ; $smarty->assign ('clientkeep', $config["clients"][$client]["keep"]) ; $smarty->assign ('client_type', $config["clients"][$client]["type"]) ; $smarty->assign ('clientuser', $config["clients"][$client]["user"]) ; + if ($submit == "addclient") + $smarty->assign ('clientsubmit', "Add") ; + else + $smarty->assign ('clientsubmit', "Update") ; $smarty->assign ('locations', $config["clients"][$client]["location"]) ; $smarty->display ('config.tpl') ; ?> From finnarne-guest at alioth.debian.org Fri Apr 13 06:41:54 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 06:41:56 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates config.tpl Message-ID: User: finnarne-guest Date: 07/04/13 06:41:54 Modified: templates config.tpl Log: html_options needs both values and outputs, unless you want a numerical output Revision Changes Path 1.2 +8 -5 slbackup-php/templates/config.tpl Index: config.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/config.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- config.tpl 13 Apr 2007 06:07:38 -0000 1.1 +++ config.tpl 13 Apr 2007 06:41:54 -0000 1.2 @@ -28,9 +28,9 @@ Backup enabled Run backup at - {html_options name=minutes options=$a_minutes selected=$minutes} + {html_options name=minutes values=$a_minutes output=$a_minutes selected=$minutes} : - {html_options name=hours options=$a_hours selected=$hours} + {html_options name=hours values=$a_hours output=$a_hours selected=$hours}

Server config

@@ -50,7 +50,8 @@ Servertype - {html_options name=server_type options=$types selected=$server_type} + {html_options name=server_type values=$types + output=$types selected=$server_type} User @@ -70,7 +71,8 @@

Client config

Client: - {html_options name=client options=$clients selected=$client} + {html_options name=client values=$clients output=$clients + selected=$client} @@ -90,7 +92,8 @@ Clienttype - {html_options name=client_type options=$types selected=$client_type} + {html_options name=client_type values=$types + output=$types selected=$client_type} User From finnarne-guest at alioth.debian.org Fri Apr 13 09:20:35 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:20:36 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/13 09:20:35 Modified: src index.php Log: Making the storage of password more secure by storing on part in the form, and one in a session variable on te server (copied mostly from lwat) Revision Changes Path 1.8 +16 -2 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- index.php 13 Apr 2007 06:33:19 -0000 1.7 +++ index.php 13 Apr 2007 09:20:34 -0000 1.8 @@ -199,6 +199,11 @@ case "Passwd": $passwd = $value ; break ; + case "xorstring": + $xorstring = $value ; + $encrypt = $_SESSION["encrypt"] ; + $passwd = xorstring ($encrypt, $xorstring) ; + break ; case "addclient": case "server": case "chooseclient": @@ -229,6 +234,12 @@ return ; } +if (empty($encrypt) || empty ($xorstring)) { + $encrypt = crypt(sprintf (gettimeofday (true))) ; + $_SESSION['encrypt'] = $encrypt ; + $xorstring = xorstring ($encrypt, $passwd) ; +} + $scheduler = readcron ($passwd) ; foreach ($scheduler as $line) { @@ -347,7 +358,7 @@ writeconf ($passwd, $config) ; break ; } - $smarty->assign ('passwd', $passwd) ; + $smarty->assign ('xorstring', $xorstring) ; if ($config["active"]) $smarty->assign ('active', "checked") ; for ($i = 0 ; $i < 60 ; $i += 5) @@ -363,7 +374,10 @@ $smarty->assign ('server_type', $config["server_type"]) ; $smarty->assign ('server_user', $config["server_user"]) ; $smarty->assign ('types', array ('local', 'remote')) ; - $smarty->assign ('clients', array_keys($config["clients"])) ; + $clients = array_keys($config["clients"]) ; + $smarty->assign ('clients', $clients) ; + if (empty($client)) + $client = $clients[0] ; $smarty->assign ('client', $client) ; $smarty->assign ('clientaddress', $config["clients"][$client]["address"]) ; $smarty->assign ('clientkeep', $config["clients"][$client]["keep"]) ; From finnarne-guest at alioth.debian.org Fri Apr 13 09:20:35 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:20:36 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates config.tpl Message-ID: User: finnarne-guest Date: 07/04/13 09:20:35 Modified: templates config.tpl Log: Making the storage of password more secure by storing on part in the form, and one in a session variable on te server (copied mostly from lwat) Revision Changes Path 1.3 +1 -1 slbackup-php/templates/config.tpl Index: config.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/config.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- config.tpl 13 Apr 2007 06:41:54 -0000 1.2 +++ config.tpl 13 Apr 2007 09:20:35 -0000 1.3 @@ -23,7 +23,7 @@
- +

Server scheduler

Backup enabled From finnarne-guest at alioth.debian.org Fri Apr 13 09:39:16 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:39:18 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian - New directory Message-ID: User: finnarne-guest Date: 07/04/13 09:39:16 slbackup-php/debian - New directory From finnarne-guest at alioth.debian.org Fri Apr 13 09:41:33 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:41:34 2007 Subject: [slbackup-commit] CVS update: slbackup-php Makefile Message-ID: User: finnarne-guest Date: 07/04/13 09:41:33 Added: . Makefile Log: Tried to debianize this Package, by copying most of Makefile and debian/ from lwat Revision Changes Path 1.1 slbackup-php/Makefile Index: Makefile =================================================================== PACKAGE = slbackup-php LIBS= \ admin.php \ admin.js \ index.php \ fixup.php \ chguserpw.php \ default.css \ createlm.php \ buildconf.php \ import.php \ functions.php SCRIPTS= \ createhomedir CONFS= \ apache.conf SAMPLES= \ admin.ini \ admin-edu.ini \ admin-slx.ini \ config.php DOCS= \ README \ TODO \ ChangeLog BIN= \ slbackup-php_adduser.php INSTALL = install -p -m 755 INSTALL_DATA= install -D -p -m 644 LANG=C prefix = /usr/local sysconfdir = /etc/$(PACKAGE) sharedir = $(prefix)/share/$(PACKAGE) webdir = $(sharedir)/web scriptsdir = $(sharedir)/scripts templatedir= $(sharedir)/templates localedir = $(sharedir)/locales docdir = $(prefix)/share/doc/$(PACKAGE) htmldocdir = $(prefix)/share/doc/$(PACKAGE)/html sampledir = $(prefix)/share/doc/$(PACKAGE)/examples bindir = $(prefix)/bin all: po/*.po: po/slbackup-php.pot cp $@ $@.bak ; \ msgmerge $@.bak $^ > $@ locales/mo-stamp: po/*.po for po in $^ ; do \ locale=$$(basename $$po .po) ; \ echo $$locale ; \ mkdir -p locales/$$locale/LC_MESSAGES ; \ msgfmt --statistics -o locales/$$locale/LC_MESSAGES/$(PACKAGE).mo $$po ; \ done touch locales/mo-stamp mo-files: locales/mo-stamp po/slbackup-php.pot: lib/*.php templates/*.tpl tsmarty2c.php templates | \ xgettext --add-comments --default-domain=slbackup-php \ - lib/*.php --output po/slbackup-php.pot install: all install -d $(DESTDIR)$(sharedir) install -d $(DESTDIR)$(sysconfdir) install -d $(DESTDIR)$(docdir) install -d $(DESTDIR)$(htmldocdir) install -d $(DESTDIR)$(sampledir) install -d $(DESTDIR)$(webdir) install -d $(DESTDIR)$(scriptsdir) install -d $(DESTDIR)$(templatedir) install -d $(DESTDIR)$(localedir) install -d $(DESTDIR)$(bindir) for locale in $$(find locales -type f -name $(PACKAGE).mo -printf "%P ") ; do \ install -d $(DESTDIR)$(localedir)/$$(dirname $$locale) ; \ $(INSTALL_DATA) locales/$$locale $(DESTDIR)$(localedir)/$$(dirname $$locale) ; \ done for templates in $$(find templates -type f -name "*.tpl" -printf "%P ") ; do \ $(INSTALL_DATA) templates/$$templates $(DESTDIR)$(templatedir) ; \ done for script in $(SCRIPTS); do \ $(INSTALL) share/$$script $(DESTDIR)$(scriptsdir); \ done for lib in $(LIBS); do \ $(INSTALL_DATA) lib/$$lib $(DESTDIR)$(webdir) ; \ done for conf in $(CONFS); do \ $(INSTALL_DATA) etc/$$conf $(DESTDIR)$(sysconfdir) ; \ done for doc in $(DOCS); do \ $(INSTALL_DATA) $$doc $(DESTDIR)$(docdir) ; \ done for htmldoc in $$(find doc -type f -name "*.html" -printf "%P ") ; do \ $(INSTALL_DATA) doc/$$htmldoc $(DESTDIR)$(htmldocdir) ; \ done for sample in $(SAMPLES); do \ $(INSTALL_DATA) examples/$$sample $(DESTDIR)$(sampledir) ; \ done for bin in $(BIN); do \ $(INSTALL) bin/$$bin $(DESTDIR)$(bindir) ; \ done clean: # Remove CVS cruft find . -type f -name '.#*' -o -name "*.bak" -o -name "*~" | xargs -r rm -v # Removed completed translations rm -rf locales dist: debuild -us -uc From finnarne-guest at alioth.debian.org Fri Apr 13 09:41:33 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:41:34 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog compat control copyright links postinst postrm prerm rules slbackup.desktop Message-ID: User: finnarne-guest Date: 07/04/13 09:41:33 Added: debian changelog compat control copyright links postinst postrm prerm rules slbackup.desktop Log: Tried to debianize this Package, by copying most of Makefile and debian/ from lwat Revision Changes Path 1.1 slbackup-php/debian/changelog Index: changelog =================================================================== slbackup-php (0.0.1) UNSTABLE; urgency=low * Initial upload (Closes: #405076) -- Finn-Arne Johansen Fri, 13 Apr 2007 11:34:45 +0200 1.1 slbackup-php/debian/compat Index: compat =================================================================== 5 1.1 slbackup-php/debian/control Index: control =================================================================== Source: slbackup-php Section: misc Priority: optional Maintainer: Finn-Arne Johansen Standards-Version: 3.7.2 Build-Depends: debhelper (>= 5), po-debconf Package: slbackup-php Architecture: all Depends: debconf | debconf-2.0, libapache2-mod-php5, apache2, smarty, ssh Description: slbackup-php, an administration tool for slbackup Aims to provide the necesarry functions to maintain a slbackup-repository That means the ability to - schedule the execution of slbackup (through cron) - edit the configuration file - verify that last backup went ok (todo) - verify that ssh-keys are working (todo) - restore from backups (todo) - remove old backups from the repository (todo) 1.1 slbackup-php/debian/copyright Index: copyright =================================================================== This package was debianized by upstream author Finn-Arne Johansen on Fri, 13 Apr 2007 11:30:00 +0200. Copyright holder: Finn-Arne Johansen License: You are free to distribute this software under the terms of the GNU General Public License. On Debian systems, the complete text of the GNU General Public License can be found in the file /usr/share/common-licenses/GPL. 1.1 slbackup-php/debian/links Index: links =================================================================== etc/lwat/apache.conf etc/apache2/sites-available/lwat 1.1 slbackup-php/debian/postinst Index: postinst =================================================================== #!/bin/sh set -e . /usr/share/debconf/confmodule if [ -x /usr/sbin/a2ensite ] && [ -x /usr/sbin/a2enmod ]; then /usr/sbin/a2ensite slbackup >/dev/null /usr/sbin/a2enmod rewrite > /dev/null if [ -x /usr/sbin/invoke-rc.d ] ; then /usr/sbin/invoke-rc.d apache2 force-reload || : else [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || : fi else echo "Can't detect apache2 package and therefore not enabling the site" fi mkdir -p /var/spool/slbackup-php if [ -d /var/spool/slbackup-php ]; then chown www-data:www-data /var/spool/slbackup-php/ fi db_stop #DEBHELPER# 1.1 slbackup-php/debian/postrm Index: postrm =================================================================== #!/bin/sh set -e rm -rf /var/spool/slbackup-php/ #DEBHELPER# 1.1 slbackup-php/debian/prerm Index: prerm =================================================================== #!/bin/sh set -e if [ -x /usr/sbin/a2dissite ] && [ -L /etc/apache2/sites-enabled/slbackup-php ] ; then /usr/sbin/a2dissite slbackup-php >/dev/null if [ -x "`which invoke-rc.d 2>/dev/null`" ] ; then /usr/sbin/invoke-rc.d apache2 force-reload || : else [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || : fi else echo "Can't detect apache2-common, so don't disabling slbackup-php." fi #DEBHELPER# 1.1 slbackup-php/debian/rules Index: rules =================================================================== #!/usr/bin/make -f # -*- makefile -*- build: build-stamp build-stamp: dh_testdir $(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp -$(MAKE) clean dh_clean debconf-updatepo install: build dh_testdir dh_testroot dh_clean -k -$(MAKE) mo-files dh_installdirs $(MAKE) install DESTDIR=$(CURDIR)/debian/slbackup-php prefix=/usr binary-arch: binary-indep: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs ./ChangeLog mv $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/ChangeLog $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/changelog dh_installcron dh_installdebconf dh_installman dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install 1.1 slbackup-php/debian/slbackup.desktop Index: slbackup.desktop =================================================================== [Desktop Entry] Encoding=UTF-8 Name=slbackup-php GenericName=SLBackup configuration tool Comment=Webpage for configuring slbackup Version=1.0 TryExec=x-www-browser https://tjener/slbackup-php/ Exec=x-www-browser https://tjener/slbackup-php/ Terminal=false Type=Application Categories=Application;Network;System;Security From finnarne-guest at alioth.debian.org Fri Apr 13 09:44:13 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:44:14 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian rules Message-ID: User: finnarne-guest Date: 07/04/13 09:44:13 Modified: debian rules Log: There is no po-fiels for now Revision Changes Path 1.2 +1 -1 slbackup-php/debian/rules Index: rules =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/rules,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- rules 13 Apr 2007 09:41:33 -0000 1.1 +++ rules 13 Apr 2007 09:44:13 -0000 1.2 @@ -15,7 +15,7 @@ rm -f build-stamp -$(MAKE) clean dh_clean - debconf-updatepo + #debconf-updatepo install: build dh_testdir From finnarne-guest at alioth.debian.org Fri Apr 13 09:46:58 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:46:59 2007 Subject: [slbackup-commit] CVS update: slbackup-php Makefile Message-ID: User: finnarne-guest Date: 07/04/13 09:46:58 Modified: . Makefile Log: Cleaned up som lwat stuf from Makefile Revision Changes Path 1.2 +6 -22 slbackup-php/Makefile Index: Makefile =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 13 Apr 2007 09:41:32 -0000 1.1 +++ Makefile 13 Apr 2007 09:46:58 -0000 1.2 @@ -1,35 +1,19 @@ PACKAGE = slbackup-php LIBS= \ - admin.php \ - admin.js \ index.php \ - fixup.php \ - chguserpw.php \ - default.css \ - createlm.php \ - buildconf.php \ - import.php \ functions.php SCRIPTS= \ - createhomedir + mypass.sh CONFS= \ apache.conf -SAMPLES= \ - admin.ini \ - admin-edu.ini \ - admin-slx.ini \ - config.php - -DOCS= \ - README \ - TODO \ - ChangeLog +SAMPLES= -BIN= \ - slbackup-php_adduser.php +DOCS= + +BIN= INSTALL = install -p -m 755 INSTALL_DATA= install -D -p -m 644 @@ -64,7 +48,7 @@ mo-files: locales/mo-stamp -po/slbackup-php.pot: lib/*.php templates/*.tpl +po/slbackup-php.pot: src/*.php templates/*.tpl tsmarty2c.php templates | \ xgettext --add-comments --default-domain=slbackup-php \ - lib/*.php --output po/slbackup-php.pot From finnarne-guest at alioth.debian.org Fri Apr 13 09:48:40 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:48:41 2007 Subject: [slbackup-commit] CVS update: slbackup-php Makefile Message-ID: User: finnarne-guest Date: 07/04/13 09:48:40 Modified: . Makefile Log: Fixed some renamed folders Revision Changes Path 1.3 +3 -3 slbackup-php/Makefile Index: Makefile =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile 13 Apr 2007 09:46:58 -0000 1.2 +++ Makefile 13 Apr 2007 09:48:40 -0000 1.3 @@ -23,7 +23,7 @@ sysconfdir = /etc/$(PACKAGE) sharedir = $(prefix)/share/$(PACKAGE) webdir = $(sharedir)/web -scriptsdir = $(sharedir)/scripts +scriptdir = $(sharedir)/script templatedir= $(sharedir)/templates localedir = $(sharedir)/locales docdir = $(prefix)/share/doc/$(PACKAGE) @@ -61,7 +61,7 @@ install -d $(DESTDIR)$(htmldocdir) install -d $(DESTDIR)$(sampledir) install -d $(DESTDIR)$(webdir) - install -d $(DESTDIR)$(scriptsdir) + install -d $(DESTDIR)$(scriptdir) install -d $(DESTDIR)$(templatedir) install -d $(DESTDIR)$(localedir) install -d $(DESTDIR)$(bindir) @@ -77,7 +77,7 @@ done for script in $(SCRIPTS); do \ - $(INSTALL) share/$$script $(DESTDIR)$(scriptsdir); \ + $(INSTALL) script/$$script $(DESTDIR)$(scriptdir); \ done for lib in $(LIBS); do \ From finnarne-guest at alioth.debian.org Fri Apr 13 09:49:25 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:49:26 2007 Subject: [slbackup-commit] CVS update: slbackup-php Makefile Message-ID: User: finnarne-guest Date: 07/04/13 09:49:25 Modified: . Makefile Log: Fixed some renamed folders Revision Changes Path 1.4 +2 -2 slbackup-php/Makefile Index: Makefile =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile 13 Apr 2007 09:48:40 -0000 1.3 +++ Makefile 13 Apr 2007 09:49:25 -0000 1.4 @@ -51,7 +51,7 @@ po/slbackup-php.pot: src/*.php templates/*.tpl tsmarty2c.php templates | \ xgettext --add-comments --default-domain=slbackup-php \ - - lib/*.php --output po/slbackup-php.pot + - src/*.php --output po/slbackup-php.pot install: all @@ -81,7 +81,7 @@ done for lib in $(LIBS); do \ - $(INSTALL_DATA) lib/$$lib $(DESTDIR)$(webdir) ; \ + $(INSTALL_DATA) src/$$lib $(DESTDIR)$(webdir) ; \ done for conf in $(CONFS); do \ From finnarne-guest at alioth.debian.org Fri Apr 13 09:50:39 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:50:41 2007 Subject: [slbackup-commit] CVS update: slbackup-php/etc - New directory Message-ID: User: finnarne-guest Date: 07/04/13 09:50:39 slbackup-php/etc - New directory From finnarne-guest at alioth.debian.org Fri Apr 13 09:50:59 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:51:01 2007 Subject: [slbackup-commit] CVS update: slbackup-php/etc apache.conf Message-ID: User: finnarne-guest Date: 07/04/13 09:50:59 Added: etc apache.conf Log: Configure apache on the fly Revision Changes Path 1.1 slbackup-php/etc/apache.conf Index: apache.conf =================================================================== Alias /slbackup-php "/usr/share/slbackup-php/web" RewriteEngine on RewriteCond %{HTTPS} !^on$ [NC] RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L] DirectoryIndex index.php index.html Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all From finnarne-guest at alioth.debian.org Fri Apr 13 09:52:02 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:52:04 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian rules Message-ID: User: finnarne-guest Date: 07/04/13 09:52:02 Modified: debian rules Log: Upstream changelog is debian/changelog Revision Changes Path 1.3 +2 -2 slbackup-php/debian/rules Index: rules =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/rules,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- rules 13 Apr 2007 09:44:13 -0000 1.2 +++ rules 13 Apr 2007 09:52:02 -0000 1.3 @@ -32,8 +32,8 @@ dh_testdir dh_testroot dh_installchangelogs - dh_installdocs ./ChangeLog - mv $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/ChangeLog $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/changelog + #dh_installdocs ./ChangeLog + #mv $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/ChangeLog $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/changelog dh_installcron dh_installdebconf dh_installman From finnarne-guest at alioth.debian.org Fri Apr 13 09:53:23 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 09:53:24 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: finnarne-guest Date: 07/04/13 09:53:23 Modified: debian changelog Log: Fix emailaddress, so that it's possible to sing this thing Revision Changes Path 1.2 +2 -2 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- changelog 13 Apr 2007 09:41:33 -0000 1.1 +++ changelog 13 Apr 2007 09:53:23 -0000 1.2 @@ -1,5 +1,5 @@ -slbackup-php (0.0.1) UNSTABLE; urgency=low +slbackup-php (0.0.1) experimental; urgency=low * Initial upload (Closes: #405076) - -- Finn-Arne Johansen Fri, 13 Apr 2007 11:34:45 +0200 + -- Finn-Arne Johansen Fri, 13 Apr 2007 11:52:29 +0200 From finnarne-guest at alioth.debian.org Fri Apr 13 10:00:55 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 10:00:56 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian links Message-ID: User: finnarne-guest Date: 07/04/13 10:00:55 Modified: debian links Log: On more thing left over from lwat Revision Changes Path 1.2 +1 -1 slbackup-php/debian/links Index: links =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/links,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- links 13 Apr 2007 09:41:33 -0000 1.1 +++ links 13 Apr 2007 10:00:55 -0000 1.2 @@ -1 +1 @@ -etc/lwat/apache.conf etc/apache2/sites-available/lwat +etc/slbackup-php/apache.conf etc/apache2/sites-available/slbackup From finnarne-guest at alioth.debian.org Fri Apr 13 10:01:31 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 10:01:32 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: finnarne-guest Date: 07/04/13 10:01:31 Modified: debian changelog Log: Needed to have target unstable Revision Changes Path 1.3 +3 -3 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- changelog 13 Apr 2007 09:53:23 -0000 1.2 +++ changelog 13 Apr 2007 10:01:31 -0000 1.3 @@ -1,5 +1,5 @@ -slbackup-php (0.0.1) experimental; urgency=low +slbackup-php (0.0.1) unstable; urgency=low - * Initial upload (Closes: #405076) + * Initial upload - -- Finn-Arne Johansen Fri, 13 Apr 2007 11:52:29 +0200 + -- Finn-Arne Johansen Fri, 13 Apr 2007 12:00:41 +0200 From finnarne-guest at alioth.debian.org Fri Apr 13 10:48:48 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 10:48:50 2007 Subject: [slbackup-commit] CVS update: slbackup-php/po - New directory Message-ID: User: finnarne-guest Date: 07/04/13 10:48:48 slbackup-php/po - New directory From finnarne-guest at alioth.debian.org Fri Apr 13 10:51:07 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 10:51:09 2007 Subject: [slbackup-commit] CVS update: slbackup-php/po slbackup-php.pot Message-ID: User: finnarne-guest Date: 07/04/13 10:51:07 Added: po slbackup-php.pot Log: Preparred localization of login.tpl Revision Changes Path 1.1 slbackup-php/po/slbackup-php.pot Index: slbackup-php.pot =================================================================== # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-04-13 12:50+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. templates/login.tpl #: standard input:2 msgid "SLBackup Configuration" msgstr "" #. templates/login.tpl #: standard input:5 msgid "To read the configuration, you must log in as %1 on %2." msgstr "" #. templates/login.tpl #: standard input:8 msgid "Please enter the password for the %1 account on %2:" msgstr "" #. templates/login.tpl #: standard input:11 msgid "Login" msgstr "" #. templates/login.tpl #: standard input:14 msgid "Reset" msgstr "" From finnarne-guest at alioth.debian.org Fri Apr 13 10:51:08 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 10:51:09 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates login.tpl Message-ID: User: finnarne-guest Date: 07/04/13 10:51:08 Modified: templates login.tpl Log: Preparred localization of login.tpl Revision Changes Path 1.2 +5 -7 slbackup-php/templates/login.tpl Index: login.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/login.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- login.tpl 13 Apr 2007 06:07:38 -0000 1.1 +++ login.tpl 13 Apr 2007 10:51:07 -0000 1.2 @@ -18,16 +18,14 @@ *} - SLBackup Configuration + {t}SLBackup Configuration{/t} - To read the configuration, you must log in as {$backupuser} - on {$backuphost}.
- Please enter the password for the {$backupuser} account on - {$backuphost}:
+ {t 1=$backupuser 2=$backuphost}To read the configuration, you must log in as %1 on %2.{/t}
+ {t 1=$backupuser 2=$backuphost}Please enter the password for the %1 account on %2:{/t}

- - + + From finnarne-guest at alioth.debian.org Fri Apr 13 10:57:40 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 10:57:41 2007 Subject: [slbackup-commit] CVS update: slbackup-php/po slbackup-php.pot Message-ID: User: finnarne-guest Date: 07/04/13 10:57:40 Modified: po slbackup-php.pot Log: Preparred localization of config.tpl Revision Changes Path 1.2 +106 -9 slbackup-php/po/slbackup-php.pot Index: slbackup-php.pot =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/slbackup-php.pot,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- slbackup-php.pot 13 Apr 2007 10:51:07 -0000 1.1 +++ slbackup-php.pot 13 Apr 2007 10:57:40 -0000 1.2 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-13 12:50+0200\n" +"POT-Creation-Date: 2007-04-13 12:56+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,27 +16,124 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" +#. templates/config.tpl #. templates/login.tpl -#: standard input:2 +#: standard input:2 standard input:80 msgid "SLBackup Configuration" msgstr "" -#. templates/login.tpl +#. templates/config.tpl #: standard input:5 -msgid "To read the configuration, you must log in as %1 on %2." +msgid "Server scheduler" msgstr "" -#. templates/login.tpl +#. templates/config.tpl #: standard input:8 -msgid "Please enter the password for the %1 account on %2:" +msgid "Backup enabled" msgstr "" -#. templates/login.tpl +#. templates/config.tpl #: standard input:11 -msgid "Login" +msgid "Run backup at" msgstr "" +#. templates/config.tpl +#: standard input:14 standard input:35 +msgid "Update" +msgstr "" + +#. templates/config.tpl #. templates/login.tpl -#: standard input:14 +#: standard input:17 standard input:38 standard input:68 standard input:92 msgid "Reset" msgstr "" + +#. templates/config.tpl +#: standard input:20 +msgid "Server config" +msgstr "" + +#. templates/config.tpl +#: standard input:23 standard input:56 +msgid "Address" +msgstr "" + +#. templates/config.tpl +#: standard input:26 +msgid "Destdir" +msgstr "" + +#. templates/config.tpl +#: standard input:29 +msgid "Servertype" +msgstr "" + +#. templates/config.tpl +#: standard input:32 standard input:65 +msgid "User" +msgstr "" + +#. templates/config.tpl +#: standard input:41 +msgid "Client config" +msgstr "" + +#. templates/config.tpl +#: standard input:44 +msgid "Client:" +msgstr "" + +#. templates/config.tpl +#: standard input:47 +msgid "Choose" +msgstr "" + +#. templates/config.tpl +#: standard input:50 +msgid "New" +msgstr "" + +#. templates/config.tpl +#: standard input:53 +msgid "Remove" +msgstr "" + +#. templates/config.tpl +#: standard input:59 +msgid "Backup Age" +msgstr "" + +#. templates/config.tpl +#: standard input:62 +msgid "Clienttype" +msgstr "" + +#. templates/config.tpl +#: standard input:71 +msgid "Locations:" +msgstr "" + +#. templates/config.tpl +#: standard input:74 +msgid "Add" +msgstr "" + +#. templates/config.tpl +#: standard input:77 +msgid "Delete" +msgstr "" + +#. templates/login.tpl +#: standard input:83 +msgid "To read the configuration, you must log in as %1 on %2." +msgstr "" + +#. templates/login.tpl +#: standard input:86 +msgid "Please enter the password for the %1 account on %2:" +msgstr "" + +#. templates/login.tpl +#: standard input:89 +msgid "Login" +msgstr "" From finnarne-guest at alioth.debian.org Fri Apr 13 10:57:40 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 10:57:41 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates config.tpl Message-ID: User: finnarne-guest Date: 07/04/13 10:57:40 Modified: templates config.tpl Log: Preparred localization of config.tpl Revision Changes Path 1.4 +26 -26 slbackup-php/templates/config.tpl Index: config.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/config.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- config.tpl 13 Apr 2007 09:20:35 -0000 1.3 +++ config.tpl 13 Apr 2007 10:57:40 -0000 1.4 @@ -18,42 +18,42 @@ *} - SLBackup Configuration + {t}SLBackup Configuration{/t}
-

Server scheduler

- Backup enabled +

{t}Server scheduler{/t}

+ {t}Backup enabled{/t} - Run backup at + {t}Run backup at{/t} {html_options name=minutes values=$a_minutes output=$a_minutes selected=$minutes} : {html_options name=hours values=$a_hours output=$a_hours selected=$hours} - - -

Server config

+ + +

{t}Server config{/t}

- + - + - + - +
Address{t}Address{/t} Destdir{t}Destdir{/t}
Servertype{t}Servertype{/t} {html_options name=server_type values=$types output=$types selected=$server_type} User{t}User{/t} @@ -62,40 +62,40 @@
+ value="{t}Update{/t}"> + value="{t}Reset{/t}">
-

Client config

- Client: +

{t}Client config{/t}

+ {t}Client:{/t} {html_options name=client values=$clients output=$clients selected=$client} - - - + + + - + - + - + - + - + - + - +
Address{t}Address{/t} Backup Age{t}Backup Age{/t}
Clienttype{t}Clienttype{/t} {html_options name=client_type values=$types output=$types selected=$client_type} User{t}User{/t} @@ -106,13 +106,13 @@ + value="{t}Reset{/t}">
Locations:{t}Locations:{/t}
@@ -124,7 +124,7 @@ {/foreach}
From finnarne-guest at alioth.debian.org Fri Apr 13 11:03:04 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 11:03:05 2007 Subject: [slbackup-commit] CVS update: slbackup-php/po slbackup-php.pot Message-ID: User: finnarne-guest Date: 07/04/13 11:03:04 Modified: po slbackup-php.pot Log: Preparred localization of index.php Revision Changes Path 1.3 +18 -3 slbackup-php/po/slbackup-php.pot Index: slbackup-php.pot =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/slbackup-php.pot,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- slbackup-php.pot 13 Apr 2007 10:57:40 -0000 1.2 +++ slbackup-php.pot 13 Apr 2007 11:03:04 -0000 1.3 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-13 12:56+0200\n" +"POT-Creation-Date: 2007-04-13 13:02+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -38,7 +38,7 @@ msgstr "" #. templates/config.tpl -#: standard input:14 standard input:35 +#: standard input:14 standard input:35 src/index.php:389 msgid "Update" msgstr "" @@ -114,7 +114,7 @@ msgstr "" #. templates/config.tpl -#: standard input:74 +#: standard input:74 src/index.php:387 msgid "Add" msgstr "" @@ -137,3 +137,18 @@ #: standard input:89 msgid "Login" msgstr "" + +#: src/index.php:305 +#, php-format +msgid "No client specified :(" +msgstr "" + +#: src/index.php:310 +#, php-format +msgid "Unable to find %s in the list of clients." +msgstr "" + +#: src/index.php:344 +#, php-format +msgid "Unable to find %s in the locations of %s." +msgstr "" From finnarne-guest at alioth.debian.org Fri Apr 13 11:03:04 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 11:03:05 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/13 11:03:04 Modified: src index.php Log: Preparred localization of index.php Revision Changes Path 1.9 +5 -5 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- index.php 13 Apr 2007 09:20:34 -0000 1.8 +++ index.php 13 Apr 2007 11:03:04 -0000 1.9 @@ -302,12 +302,12 @@ break ; case "delclient": if (empty ($client)) { - printf ("No client specified :(
\n") ; + printf (_("No client specified :(") . "
\n") ; break ; } $pos = array_search($client, array_keys ($config["clients"])) ; if ($pos === false) - printf ("Unable to find %s in the list of clients
\n", + printf (_("Unable to find %s in the list of clients.") . "
\n", $client) ; else { array_splice ($config["clients"], @@ -341,7 +341,7 @@ $pos = array_search ($newconf["location"], $config["clients"][$client]["location"]) ; if ($pos === false) - printf ("Unable to find %s in the locations of %s
\n", + printf (_("Unable to find %s in the locations of %s.") . "
\n", $newconf["location"], $client) ; else array_splice ($config["clients"][$client]["location"], @@ -384,9 +384,9 @@ $smarty->assign ('client_type', $config["clients"][$client]["type"]) ; $smarty->assign ('clientuser', $config["clients"][$client]["user"]) ; if ($submit == "addclient") - $smarty->assign ('clientsubmit', "Add") ; + $smarty->assign ('clientsubmit', _("Add")) ; else - $smarty->assign ('clientsubmit', "Update") ; + $smarty->assign ('clientsubmit', _("Update")) ; $smarty->assign ('locations', $config["clients"][$client]["location"]) ; $smarty->display ('config.tpl') ; ?> From finnarne-guest at alioth.debian.org Fri Apr 13 11:25:13 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 11:25:15 2007 Subject: [slbackup-commit] CVS update: slbackup-php COPYING COPYRIGHT Message-ID: User: finnarne-guest Date: 07/04/13 11:25:13 Added: . COPYING COPYRIGHT Log: Added Copyright and license stuff Revision Changes Path 1.1 slbackup-php/COPYING Index: COPYING =================================================================== GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. 1.1 slbackup-php/COPYRIGHT Index: COPYRIGHT =================================================================== ###################################################################### # slbackup-php an administration tool for slbackup # Copyright (c) 2006 - 2007 Finn-Arne Johansen # BzzWare AS, Norway # # Web: http://www.bzz.no # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ####################################################################### From finnarne-guest at alioth.debian.org Fri Apr 13 11:25:44 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 11:25:45 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: finnarne-guest Date: 07/04/13 11:25:44 Modified: debian changelog Log: Added Copyright and license stuff Revision Changes Path 1.4 +6 -0 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- changelog 13 Apr 2007 10:01:31 -0000 1.3 +++ changelog 13 Apr 2007 11:25:44 -0000 1.4 @@ -1,3 +1,9 @@ +slbackup-php (0.0.2) unstable; urgency=low + + * Added copyright and license stuff + + -- Finn-Arne Johansen Fri, 13 Apr 2007 13:25:04 +0200 + slbackup-php (0.0.1) unstable; urgency=low * Initial upload From finnarne-guest at alioth.debian.org Fri Apr 13 13:33:14 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 13:33:16 2007 Subject: [slbackup-commit] CVS update: slbackup-php Makefile Message-ID: User: finnarne-guest Date: 07/04/13 13:33:14 Modified: . Makefile Log: Try to include copyright-file Revision Changes Path 1.5 +2 -1 slbackup-php/Makefile Index: Makefile =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile 13 Apr 2007 09:49:25 -0000 1.4 +++ Makefile 13 Apr 2007 13:33:14 -0000 1.5 @@ -11,7 +11,8 @@ SAMPLES= -DOCS= +DOCS= \ + COPYRIGHT BIN= From finnarne-guest at alioth.debian.org Fri Apr 13 13:45:17 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 13:45:18 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian rules Message-ID: User: finnarne-guest Date: 07/04/13 13:45:17 Modified: debian rules Log: Try to include som copyright file Revision Changes Path 1.4 +1 -0 slbackup-php/debian/rules Index: rules =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/rules,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- rules 13 Apr 2007 09:52:02 -0000 1.3 +++ rules 13 Apr 2007 13:45:17 -0000 1.4 @@ -33,6 +33,7 @@ dh_testroot dh_installchangelogs #dh_installdocs ./ChangeLog + dh_installdocs #mv $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/ChangeLog $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/changelog dh_installcron dh_installdebconf From finnarne-guest at alioth.debian.org Fri Apr 13 13:46:52 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 13:46:52 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian control Message-ID: User: finnarne-guest Date: 07/04/13 13:46:52 Modified: debian control Log: E: slbackup-php: description-starts-with-package-name Revision Changes Path 1.2 +1 -1 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- control 13 Apr 2007 09:41:33 -0000 1.1 +++ control 13 Apr 2007 13:46:52 -0000 1.2 @@ -8,7 +8,7 @@ Package: slbackup-php Architecture: all Depends: debconf | debconf-2.0, libapache2-mod-php5, apache2, smarty, ssh -Description: slbackup-php, an administration tool for slbackup +Description: A web-based administration tool for slbackup written in php Aims to provide the necesarry functions to maintain a slbackup-repository That means the ability to - schedule the execution of slbackup (through cron) From finnarne-guest at alioth.debian.org Fri Apr 13 13:51:55 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 13:51:55 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian control Message-ID: User: finnarne-guest Date: 07/04/13 13:51:55 Modified: debian control Log: W: slbackup-php: possible-unindented-list-in-extended-description Revision Changes Path 1.3 +6 -6 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- control 13 Apr 2007 13:46:52 -0000 1.2 +++ control 13 Apr 2007 13:51:55 -0000 1.3 @@ -11,9 +11,9 @@ Description: A web-based administration tool for slbackup written in php Aims to provide the necesarry functions to maintain a slbackup-repository That means the ability to - - schedule the execution of slbackup (through cron) - - edit the configuration file - - verify that last backup went ok (todo) - - verify that ssh-keys are working (todo) - - restore from backups (todo) - - remove old backups from the repository (todo) + - schedule the execution of slbackup (through cron) + - edit the configuration file + - verify that last backup went ok (todo) + - verify that ssh-keys are working (todo) + - restore from backups (todo) + - remove old backups from the repository (todo) From finnarne-guest at alioth.debian.org Fri Apr 13 13:53:37 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 13:53:39 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: finnarne-guest Date: 07/04/13 13:53:37 Modified: debian changelog Log: Another upload? Revision Changes Path 1.5 +1 -7 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- changelog 13 Apr 2007 11:25:44 -0000 1.4 +++ changelog 13 Apr 2007 13:53:37 -0000 1.5 @@ -1,11 +1,5 @@ -slbackup-php (0.0.2) unstable; urgency=low - - * Added copyright and license stuff - - -- Finn-Arne Johansen Fri, 13 Apr 2007 13:25:04 +0200 - slbackup-php (0.0.1) unstable; urgency=low * Initial upload - -- Finn-Arne Johansen Fri, 13 Apr 2007 12:00:41 +0200 + -- Finn-Arne Johansen Fri, 13 Apr 2007 15:52:51 +0200 From finnarne-guest at alioth.debian.org Fri Apr 13 14:13:31 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 14:13:32 2007 Subject: [slbackup-commit] CVS update: slbackup-php/po nb_NO.po Message-ID: User: finnarne-guest Date: 07/04/13 14:13:31 Added: po nb_NO.po Log: Added norwegian translations Revision Changes Path 1.1 slbackup-php/po/nb_NO.po Index: nb_NO.po =================================================================== # Norwegian translation for slbackup-php # Copyright (C) 2006 Finn-Arne Johansen # This file is distributed under the same license as the slbackup-php package. # Finn-Arne Johansen , 2007 # msgid "" msgstr "" "Project-Id-Version: slbackup 0.0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-04-13 13:02+0200\n" "PO-Revision-Date: 2007-04-13 16:05+0200\n" "Last-Translator: Finn-Arne Johansen\n" "Language-Team: Norsk bokm??l\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #. templates/config.tpl #. templates/login.tpl #: standard input:2 standard input:80 msgid "SLBackup Configuration" msgstr "SLBackup Konfigurasjon" #. templates/config.tpl #: standard input:5 msgid "Server scheduler" msgstr "Tidsplanlegging" #. templates/config.tpl #: standard input:8 msgid "Backup enabled" msgstr "Kj??r backup" #. templates/config.tpl #: standard input:11 msgid "Run backup at" msgstr "Kj??r backup klokken" #. templates/config.tpl #: standard input:14 standard input:35 src/index.php:389 msgid "Update" msgstr "Oppdater" #. templates/config.tpl #. templates/login.tpl #: standard input:17 standard input:38 standard input:68 standard input:92 msgid "Reset" msgstr "Nullstill" #. templates/config.tpl #: standard input:20 msgid "Server config" msgstr "Konfigurasjon for server" #. templates/config.tpl #: standard input:23 standard input:56 msgid "Address" msgstr "Adresse" #. templates/config.tpl #: standard input:26 msgid "Destdir" msgstr "Backup-katalog" #. templates/config.tpl #: standard input:29 msgid "Servertype" msgstr "Type" #. templates/config.tpl #: standard input:32 standard input:65 msgid "User" msgstr "Bruker" #. templates/config.tpl #: standard input:41 msgid "Client config" msgstr "Konfigurasjon av klienter" #. templates/config.tpl #: standard input:44 msgid "Client:" msgstr "Klient:" #. templates/config.tpl #: standard input:47 msgid "Choose" msgstr "Velg" #. templates/config.tpl #: standard input:50 msgid "New" msgstr "Ny" #. templates/config.tpl #: standard input:53 msgid "Remove" msgstr "Slett" #. templates/config.tpl #: standard input:59 msgid "Backup Age" msgstr "Alder p?? backup" #. templates/config.tpl #: standard input:62 msgid "Clienttype" msgstr "Type" #. templates/config.tpl #: standard input:71 msgid "Locations:" msgstr "Kataloger:" #. templates/config.tpl #: standard input:74 src/index.php:387 msgid "Add" msgstr "Legg til" #. templates/config.tpl #: standard input:77 msgid "Delete" msgstr "Slett" #. templates/login.tpl #: standard input:83 msgid "To read the configuration, you must log in as %1 on %2." msgstr "For ?? se p?? konfigurasjonen, m?? du logge inn som bruker %1 p?? maskinen %2" #. templates/login.tpl #: standard input:86 msgid "Please enter the password for the %1 account on %2:" msgstr "Legg inn passordet for bruker %1 p?? %2:" #. templates/login.tpl #: standard input:89 msgid "Login" msgstr "Logg inn" #: src/index.php:305 #, php-format msgid "No client specified :(" msgstr "Ingen klient ble valgt ?? slette" #: src/index.php:310 #, php-format msgid "Unable to find %s in the list of clients." msgstr "Fant ikke klienten %s i listen." #: src/index.php:344 #, php-format msgid "Unable to find %s in the locations of %s." msgstr "Finner ikke %s i listen av kataloger." From finnarne-guest at alioth.debian.org Fri Apr 13 14:17:24 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 14:17:25 2007 Subject: [slbackup-commit] CVS update: slbackup-php Makefile Message-ID: User: finnarne-guest Date: 07/04/13 14:17:24 Modified: . Makefile Log: zobel complained about empty folders Revision Changes Path 1.6 +2 -2 slbackup-php/Makefile Index: Makefile =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile 13 Apr 2007 13:33:14 -0000 1.5 +++ Makefile 13 Apr 2007 14:17:24 -0000 1.6 @@ -59,8 +59,8 @@ install -d $(DESTDIR)$(sharedir) install -d $(DESTDIR)$(sysconfdir) install -d $(DESTDIR)$(docdir) - install -d $(DESTDIR)$(htmldocdir) - install -d $(DESTDIR)$(sampledir) + #install -d $(DESTDIR)$(htmldocdir) + #install -d $(DESTDIR)$(sampledir) install -d $(DESTDIR)$(webdir) install -d $(DESTDIR)$(scriptdir) install -d $(DESTDIR)$(templatedir) From finnarne-guest at alioth.debian.org Fri Apr 13 20:44:48 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 20:44:49 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates config.tpl menu.tpl Message-ID: User: finnarne-guest Date: 07/04/13 20:44:48 Modified: templates config.tpl Added: templates menu.tpl Log: Added a menu-file (I guess we need a stylesheet as well...) Revision Changes Path 1.5 +1 -0 slbackup-php/templates/config.tpl Index: config.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/config.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- config.tpl 13 Apr 2007 10:57:40 -0000 1.4 +++ config.tpl 13 Apr 2007 20:44:48 -0000 1.5 @@ -21,6 +21,7 @@ {t}SLBackup Configuration{/t} + {include file="menu.tpl"}
1.1 slbackup-php/templates/menu.tpl Index: menu.tpl =================================================================== {* slbackup-php, an administration tool for slbackup Copyright (C) 2007 Finn-Arne Johansen , Bzzware AS, Norway This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} From finnarne-guest at alioth.debian.org Fri Apr 13 20:46:07 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 20:46:08 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/13 20:46:07 Modified: src index.php Log: Added logout function Revision Changes Path 1.10 +7 -0 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- index.php 13 Apr 2007 11:03:04 -0000 1.9 +++ index.php 13 Apr 2007 20:46:07 -0000 1.10 @@ -212,6 +212,8 @@ case "delloc": case "addloc": case "scheduler": + case "status": + case "logout": $submit=$key ; break ; case "client": @@ -223,6 +225,11 @@ } } +if ($submit == "logout") { + unset ($passwd) ; + unset ($xorstring) ; + $_SESSION['encrypt'] = "" ; +} if (isset ($passwd)) $config = readconf ($passwd) ; From finnarne-guest at alioth.debian.org Fri Apr 13 20:48:30 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 20:48:32 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: finnarne-guest Date: 07/04/13 20:48:30 Modified: debian changelog Log: Added logout function Revision Changes Path 1.6 +6 -0 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- changelog 13 Apr 2007 13:53:37 -0000 1.5 +++ changelog 13 Apr 2007 20:48:30 -0000 1.6 @@ -1,3 +1,9 @@ +slbackup-php (0.0.2) unstable; urgency=low + + * Added logout functionality + + -- Finn-Arne Johansen Fri, 13 Apr 2007 22:47:53 +0200 + slbackup-php (0.0.1) unstable; urgency=low * Initial upload From werner at alioth.debian.org Fri Apr 13 21:29:23 2007 From: werner at alioth.debian.org (werner@alioth.debian.org) Date: Fri Apr 13 21:29:24 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog control postrm Message-ID: User: werner Date: 07/04/13 21:29:23 Modified: debian changelog control postrm Log: Revision Changes Path 1.7 +8 -0 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- changelog 13 Apr 2007 20:48:30 -0000 1.6 +++ changelog 13 Apr 2007 21:29:23 -0000 1.7 @@ -1,3 +1,11 @@ +slbackup-php (0.0.3~1) UNRELEASED; urgency=low + + [ Morten Werner Olsen ] + * Added a test in debian/postrm to prevent it from failure. + * Added myself as uploader. + + -- Morten Werner Olsen Fri, 13 Apr 2007 23:25:17 +0200 + slbackup-php (0.0.2) unstable; urgency=low * Added logout functionality 1.4 +1 -0 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- control 13 Apr 2007 13:51:55 -0000 1.3 +++ control 13 Apr 2007 21:29:23 -0000 1.4 @@ -2,6 +2,7 @@ Section: misc Priority: optional Maintainer: Finn-Arne Johansen +Uploaders: Morten Werner Olsen Standards-Version: 3.7.2 Build-Depends: debhelper (>= 5), po-debconf 1.2 +3 -1 slbackup-php/debian/postrm Index: postrm =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postrm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- postrm 13 Apr 2007 09:41:33 -0000 1.1 +++ postrm 13 Apr 2007 21:29:23 -0000 1.2 @@ -2,6 +2,8 @@ set -e -rm -rf /var/spool/slbackup-php/ +if [ -d /var/spool/slbackup-php ]; do + rm -rf /var/spool/slbackup-php/ +fi #DEBHELPER# From finnarne-guest at alioth.debian.org Fri Apr 13 22:12:22 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 22:12:23 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: finnarne-guest Date: 07/04/13 22:12:22 Modified: debian changelog Log: v0.0.2 is not released yet Revision Changes Path 1.8 +3 -6 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- changelog 13 Apr 2007 21:29:23 -0000 1.7 +++ changelog 13 Apr 2007 22:12:22 -0000 1.8 @@ -1,16 +1,13 @@ -slbackup-php (0.0.3~1) UNRELEASED; urgency=low +slbackup-php (0.0.2~1) UNRELEASED; urgency=low [ Morten Werner Olsen ] * Added a test in debian/postrm to prevent it from failure. * Added myself as uploader. - -- Morten Werner Olsen Fri, 13 Apr 2007 23:25:17 +0200 - -slbackup-php (0.0.2) unstable; urgency=low - + [ Finn-Arne Johansen ] * Added logout functionality - -- Finn-Arne Johansen Fri, 13 Apr 2007 22:47:53 +0200 + -- Finn-Arne Johansen Sat, 14 Apr 2007 00:11:07 +0200 slbackup-php (0.0.1) unstable; urgency=low From finnarne-guest at alioth.debian.org Fri Apr 13 22:12:22 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 22:12:23 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src functions.php index.php Message-ID: User: finnarne-guest Date: 07/04/13 22:12:22 Modified: src functions.php index.php Log: v0.0.2 is not released yet Revision Changes Path 1.3 +3 -2 slbackup-php/src/functions.php Index: functions.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/functions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- functions.php 13 Apr 2007 06:07:38 -0000 1.2 +++ functions.php 13 Apr 2007 22:12:22 -0000 1.3 @@ -19,8 +19,8 @@ */ function loadConfig () { - global $backuphost, $backupuser, $backupconf, $backupcron, $ssh_options, - $smarty_templ, $smarty_compile ; + global $backuphost, $backupuser, $backupconf, $backupcron, + $ssh_options, $logfile, $smarty_templ, $smarty_compile ; @include_once ("/etc/slbackup/config.php") ; @@ -32,6 +32,7 @@ if (empty ($backupconf)) $backupconf="/etc/slbackup/slbackup.conf" ; if (empty ($backupcron)) $backupcron="/etc/cron.d/slbackup" ; if (empty ($ssh_options)) $ssh_options="-o StrictHostKeyChecking=no" ; + if (empty ($logfile)) $logfile="/var/log/slbackup/slbackup.log" ; if (empty ($smarty_templ)) { 1.11 +39 -0 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- index.php 13 Apr 2007 20:46:07 -0000 1.10 +++ index.php 13 Apr 2007 22:12:22 -0000 1.11 @@ -176,6 +176,42 @@ return $config ; } +function readlog ($passwd) { +global $backuphost, $backupuser, $logfile, $ssh_options, $ssh_askpass ; + + $log = array () ; + $cmd = sprintf ("ssh %s %s@%s cat %s", + $ssh_options, $backupuser, + $backuphost, $logfile) ; + + $desc[0] = array ("pipe", "r") ; + $desc[1] = array ("pipe", "w") ; + $desc[2] = array ("file", "/tmp/error.log", "a") ; + + $env = array ('SSH_ASKPASS' => $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) { + if (strpos ($line, "Starting slbackup") !== false) + $log["start"] = $line ; + if (strpos ($line, "Finished slbackup") !== false) + $log["end"] = $line ; + if (strpos ($line, "Starting backup of client") !== false) + $log["clientstart"] = $line ; + if (strpos ($line, "Failed backing up client") !== false) + $log["clientfailed"] = $line ; + if (strpos ($line, "Successfully finished backing up client") !== false) + $log["clientok"] = $line ; + } + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + return $log ; +} + require_once ('functions.php') ; loadConfig () ; require('/usr/share/php/smarty/libs/Smarty.class.php') ; @@ -260,6 +296,9 @@ sscanf ($array[1], "%d", $config["hours"]) ; } switch ($submit) { + case "status": + debug (readlog ($passwd)) ; + break ; case "scheduler": $newsched = "" ; foreach ($scheduler as $line) { From finnarne-guest at alioth.debian.org Fri Apr 13 22:16:30 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 13 22:16:31 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src functions.php index.php Message-ID: User: finnarne-guest Date: 07/04/13 22:16:30 Modified: src functions.php index.php Log: readlog is not ready to be used just yet Revision Changes Path 1.4 +2 -3 slbackup-php/src/functions.php Index: functions.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- functions.php 13 Apr 2007 22:12:22 -0000 1.3 +++ functions.php 13 Apr 2007 22:16:30 -0000 1.4 @@ -19,8 +19,8 @@ */ function loadConfig () { - global $backuphost, $backupuser, $backupconf, $backupcron, - $ssh_options, $logfile, $smarty_templ, $smarty_compile ; + global $backuphost, $backupuser, $backupconf, $backupcron, $ssh_options, + $smarty_templ, $smarty_compile ; @include_once ("/etc/slbackup/config.php") ; @@ -32,7 +32,6 @@ if (empty ($backupconf)) $backupconf="/etc/slbackup/slbackup.conf" ; if (empty ($backupcron)) $backupcron="/etc/cron.d/slbackup" ; if (empty ($ssh_options)) $ssh_options="-o StrictHostKeyChecking=no" ; - if (empty ($logfile)) $logfile="/var/log/slbackup/slbackup.log" ; if (empty ($smarty_templ)) { 1.12 +0 -39 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- index.php 13 Apr 2007 22:12:22 -0000 1.11 +++ index.php 13 Apr 2007 22:16:30 -0000 1.12 @@ -176,42 +176,6 @@ return $config ; } -function readlog ($passwd) { -global $backuphost, $backupuser, $logfile, $ssh_options, $ssh_askpass ; - - $log = array () ; - $cmd = sprintf ("ssh %s %s@%s cat %s", - $ssh_options, $backupuser, - $backuphost, $logfile) ; - - $desc[0] = array ("pipe", "r") ; - $desc[1] = array ("pipe", "w") ; - $desc[2] = array ("file", "/tmp/error.log", "a") ; - - $env = array ('SSH_ASKPASS' => $ssh_askpass, - 'DISPLAY' => ':nowhere') ; - $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; - if (is_resource ($proc)) { - fprintf ($pipes[0], "%s\n", $passwd) ; - fclose ($pipes[0]) ; - while ($line = fgets ($pipes[1], 1024)) { - if (strpos ($line, "Starting slbackup") !== false) - $log["start"] = $line ; - if (strpos ($line, "Finished slbackup") !== false) - $log["end"] = $line ; - if (strpos ($line, "Starting backup of client") !== false) - $log["clientstart"] = $line ; - if (strpos ($line, "Failed backing up client") !== false) - $log["clientfailed"] = $line ; - if (strpos ($line, "Successfully finished backing up client") !== false) - $log["clientok"] = $line ; - } - fclose ($pipes[1]) ; - proc_close ($proc) ; - } - return $log ; -} - require_once ('functions.php') ; loadConfig () ; require('/usr/share/php/smarty/libs/Smarty.class.php') ; @@ -296,9 +260,6 @@ sscanf ($array[1], "%d", $config["hours"]) ; } switch ($submit) { - case "status": - debug (readlog ($passwd)) ; - break ; case "scheduler": $newsched = "" ; foreach ($scheduler as $line) { From finnarne-guest at alioth.debian.org Sat Apr 14 05:19:34 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Sat Apr 14 05:19:35 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src functions.php index.php Message-ID: User: finnarne-guest Date: 07/04/14 05:19:34 Modified: src functions.php index.php Log: Now we can kind of check the logfile... Revision Changes Path 1.5 +3 -2 slbackup-php/src/functions.php Index: functions.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/functions.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- functions.php 13 Apr 2007 22:16:30 -0000 1.4 +++ functions.php 14 Apr 2007 05:19:34 -0000 1.5 @@ -19,8 +19,8 @@ */ function loadConfig () { - global $backuphost, $backupuser, $backupconf, $backupcron, $ssh_options, - $smarty_templ, $smarty_compile ; + global $backuphost, $backupuser, $backupconf, $backupcron, + $ssh_options, $logfile, $smarty_templ, $smarty_compile ; @include_once ("/etc/slbackup/config.php") ; @@ -32,6 +32,7 @@ if (empty ($backupconf)) $backupconf="/etc/slbackup/slbackup.conf" ; if (empty ($backupcron)) $backupcron="/etc/cron.d/slbackup" ; if (empty ($ssh_options)) $ssh_options="-o StrictHostKeyChecking=no" ; + if (empty ($logfile)) $logfile="/var/log/slbackup/slbackup.log" ; if (empty ($smarty_templ)) { 1.13 +53 -1 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- index.php 13 Apr 2007 22:16:30 -0000 1.12 +++ index.php 14 Apr 2007 05:19:34 -0000 1.13 @@ -176,6 +176,49 @@ return $config ; } +function readlog ($passwd, $log) { +global $backuphost, $backupuser, $logfile, $ssh_options, $ssh_askpass ; + + $cmd = sprintf ("ssh %s %s@%s cat %s", + $ssh_options, $backupuser, + $backuphost, $logfile) ; + + $desc[0] = array ("pipe", "r") ; + $desc[1] = array ("pipe", "w") ; + $desc[2] = array ("file", "/tmp/error.log", "a") ; + + $env = array ('SSH_ASKPASS' => $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) { + list ($timestamp, $info) = explode (" - ", trim($line)) ; + if ($info == "Starting slbackup:") + $log["start"] = $timestamp ; + elseif ($info == "Finished slbackup.") + $log["end"] = $timestamp ; + elseif (strpos ($line, "Starting backup of client") !== false) { + sscanf ($info, "Starting backup of client %s", $client) ; + if (!empty ($client)) + $log["clients"][$client]["start"] = $timestamp ; + } elseif (strpos ($line, "Failed backing up client") !== false) { + sscanf ($info, "Failed backing up client %s", $client) ; + if (!empty ($client)) + $log["clients"][$client]["failed"] = $timestamp ; + } elseif (strpos ($line, "Successfully finished backing up client") !== false) { + sscanf ($info, "Successfully finished backing up client %s", $client) ; + if (!empty ($client)) + $log["clients"][$client]["ok"] = $timestamp ; + } + } + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + return $log ; +} + require_once ('functions.php') ; loadConfig () ; require('/usr/share/php/smarty/libs/Smarty.class.php') ; @@ -247,6 +290,8 @@ $xorstring = xorstring ($encrypt, $passwd) ; } +$smarty->assign ('xorstring', $xorstring) ; + $scheduler = readcron ($passwd) ; foreach ($scheduler as $line) { @@ -259,7 +304,15 @@ sscanf ($array[0], "%d", $config["minutes"]) ; sscanf ($array[1], "%d", $config["hours"]) ; } + switch ($submit) { + case "status": + $log = array ('start' => '', 'end' => '') ; + foreach ($config["clients"] as $key => $value) + $log["clients"][$key] = + array ('start' => '', 'failed' => '', 'ok' => '') ; + debug (readlog ($passwd, $log)) ; + break ; case "scheduler": $newsched = "" ; foreach ($scheduler as $line) { @@ -365,7 +418,6 @@ writeconf ($passwd, $config) ; break ; } - $smarty->assign ('xorstring', $xorstring) ; if ($config["active"]) $smarty->assign ('active', "checked") ; for ($i = 0 ; $i < 60 ; $i += 5) From finnarne-guest at alioth.debian.org Mon Apr 16 11:45:33 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 11:45:35 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/16 11:45:33 Modified: src index.php Log: Added status view Revision Changes Path 1.14 +48 -38 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- index.php 14 Apr 2007 05:19:34 -0000 1.13 +++ index.php 16 Apr 2007 11:45:33 -0000 1.14 @@ -195,22 +195,22 @@ fclose ($pipes[0]) ; while ($line = fgets ($pipes[1], 1024)) { list ($timestamp, $info) = explode (" - ", trim($line)) ; - if ($info == "Starting slbackup:") - $log["start"] = $timestamp ; + if ($info == "Starting slbackup:") + $log["start"] = strtotime($timestamp) ; elseif ($info == "Finished slbackup.") - $log["end"] = $timestamp ; + $log["end"] = strtotime($timestamp) ; elseif (strpos ($line, "Starting backup of client") !== false) { sscanf ($info, "Starting backup of client %s", $client) ; if (!empty ($client)) - $log["clients"][$client]["start"] = $timestamp ; + $log["clients"][$client]["start"] = strtotime($timestamp) ; } elseif (strpos ($line, "Failed backing up client") !== false) { sscanf ($info, "Failed backing up client %s", $client) ; if (!empty ($client)) - $log["clients"][$client]["failed"] = $timestamp ; + $log["clients"][$client]["failed"] = strtotime($timestamp) ; } elseif (strpos ($line, "Successfully finished backing up client") !== false) { sscanf ($info, "Successfully finished backing up client %s", $client) ; if (!empty ($client)) - $log["clients"][$client]["ok"] = $timestamp ; + $log["clients"][$client]["ok"] = strtotime($timestamp) ; } } fclose ($pipes[1]) ; @@ -241,6 +241,7 @@ switch ($key) { case "Passwd": $passwd = $value ; + $submit = "status" ; break ; case "xorstring": $xorstring = $value ; @@ -255,8 +256,8 @@ case "delloc": case "addloc": case "scheduler": - case "status": case "logout": + case "status": $submit=$key ; break ; case "client": @@ -311,7 +312,7 @@ foreach ($config["clients"] as $key => $value) $log["clients"][$key] = array ('start' => '', 'failed' => '', 'ok' => '') ; - debug (readlog ($passwd, $log)) ; + $log = readlog ($passwd, $log) ; break ; case "scheduler": $newsched = "" ; @@ -418,34 +419,43 @@ writeconf ($passwd, $config) ; break ; } - if ($config["active"]) - $smarty->assign ('active', "checked") ; - for ($i = 0 ; $i < 60 ; $i += 5) - $amin[] = sprintf ("%02d", $i) ; - $smarty->assign ('a_minutes', $amin); - $smarty->assign ('minutes', $config["minutes"]) ; - for ($i = 0 ; $i < 24 ; $i++) - $ahour[] = sprintf ("%02d", $i) ; - $smarty->assign ('a_hours', $ahour); - $smarty->assign ('hours', $config["hours"]) ; - $smarty->assign ('server_address', $config["server_address"]) ; - $smarty->assign ('server_destdir', $config["server_destdir"]) ; - $smarty->assign ('server_type', $config["server_type"]) ; - $smarty->assign ('server_user', $config["server_user"]) ; - $smarty->assign ('types', array ('local', 'remote')) ; - $clients = array_keys($config["clients"]) ; - $smarty->assign ('clients', $clients) ; - if (empty($client)) - $client = $clients[0] ; - $smarty->assign ('client', $client) ; - $smarty->assign ('clientaddress', $config["clients"][$client]["address"]) ; - $smarty->assign ('clientkeep', $config["clients"][$client]["keep"]) ; - $smarty->assign ('client_type', $config["clients"][$client]["type"]) ; - $smarty->assign ('clientuser', $config["clients"][$client]["user"]) ; - if ($submit == "addclient") - $smarty->assign ('clientsubmit', _("Add")) ; - else - $smarty->assign ('clientsubmit', _("Update")) ; - $smarty->assign ('locations', $config["clients"][$client]["location"]) ; - $smarty->display ('config.tpl') ; + +switch ($submit) { + case "status": + $smarty->assign ('log', $log) ; + $smarty->display ('status.tpl') ; + break ; + default: + if ($config["active"]) + $smarty->assign ('active', "checked") ; + for ($i = 0 ; $i < 60 ; $i += 5) + $amin[] = sprintf ("%02d", $i) ; + $smarty->assign ('a_minutes', $amin); + $smarty->assign ('minutes', $config["minutes"]) ; + for ($i = 0 ; $i < 24 ; $i++) + $ahour[] = sprintf ("%02d", $i) ; + $smarty->assign ('a_hours', $ahour); + $smarty->assign ('hours', $config["hours"]) ; + $smarty->assign ('server_address', $config["server_address"]) ; + $smarty->assign ('server_destdir', $config["server_destdir"]) ; + $smarty->assign ('server_type', $config["server_type"]) ; + $smarty->assign ('server_user', $config["server_user"]) ; + $smarty->assign ('types', array ('local', 'remote')) ; + $clients = array_keys($config["clients"]) ; + $smarty->assign ('clients', $clients) ; + if (empty($client)) + $client = $clients[0] ; + $smarty->assign ('client', $client) ; + $smarty->assign ('clientaddress', $config["clients"][$client]["address"]) ; + $smarty->assign ('clientkeep', $config["clients"][$client]["keep"]) ; + $smarty->assign ('client_type', $config["clients"][$client]["type"]) ; + $smarty->assign ('clientuser', $config["clients"][$client]["user"]) ; + if ($submit == "addclient") + $smarty->assign ('clientsubmit', _("Add")) ; + else + $smarty->assign ('clientsubmit', _("Update")) ; + $smarty->assign ('locations', $config["clients"][$client]["location"]) ; + $smarty->display ('config.tpl') ; + break ; +} ?> From finnarne-guest at alioth.debian.org Mon Apr 16 11:45:33 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 11:45:36 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates status.tpl Message-ID: User: finnarne-guest Date: 07/04/16 11:45:33 Added: templates status.tpl Log: Added status view Revision Changes Path 1.1 slbackup-php/templates/status.tpl Index: status.tpl =================================================================== {* slbackup-php, an administration tool for slbackup Copyright (C) 2007 Finn-Arne Johansen , Bzzware AS, Norway This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} {t}SLBackup Configuration{/t} {include file="menu.tpl"}

{t}Clients{/t}

    {foreach from=$log.clients key=client item=values}
  • Status for {$client}
    {if $values.started > $values.ok and $values.started > $values.failed } Backup started as {$values.started|date_format}, and is still in progress
    {/if} {if $values.ok > $values.failed } OK at {$values.ok|date_format} {elseif $values.failed <> ''} Failed at {$values.ok|date_format} {elseif $values.started == ''} Client never backed up {/if}
  • {/foreach}

{t}Backup status{/t}

{t 1=$log.end|date_format}Backup last finished at %1{/t}
{if $log.start > $values.end } {t 1=$log.end|date_format}A new backup started at %1{/t}
{/if} From finnarne-guest at alioth.debian.org Mon Apr 16 11:52:44 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 11:52:45 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian control Message-ID: User: finnarne-guest Date: 07/04/16 11:52:44 Modified: debian control Log: the status page now shows the status of the last backups Revision Changes Path 1.5 +2 -2 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- control 13 Apr 2007 21:29:23 -0000 1.4 +++ control 16 Apr 2007 11:52:44 -0000 1.5 @@ -14,7 +14,7 @@ That means the ability to - schedule the execution of slbackup (through cron) - edit the configuration file - - verify that last backup went ok (todo) - - verify that ssh-keys are working (todo) + - verify that last backup went ok - restore from backups (todo) - remove old backups from the repository (todo) + - verify that ssh-keys are working (todo) From finnarne-guest at alioth.debian.org Mon Apr 16 11:55:57 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 11:55:59 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: finnarne-guest Date: 07/04/16 11:55:57 Modified: debian changelog Log: New features added Revision Changes Path 1.9 +2 -1 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- changelog 13 Apr 2007 22:12:22 -0000 1.8 +++ changelog 16 Apr 2007 11:55:57 -0000 1.9 @@ -6,8 +6,9 @@ [ Finn-Arne Johansen ] * Added logout functionality + * Added a status-page - -- Finn-Arne Johansen Sat, 14 Apr 2007 00:11:07 +0200 + -- Finn-Arne Johansen Mon, 16 Apr 2007 13:55:08 +0200 slbackup-php (0.0.1) unstable; urgency=low From finnarne-guest at alioth.debian.org Mon Apr 16 15:58:53 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 15:58:55 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/16 15:58:53 Modified: src index.php Log: Added the begining of a restor Made status the default choice if nothing else is detected Revision Changes Path 1.15 +31 -12 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- index.php 16 Apr 2007 11:45:33 -0000 1.14 +++ index.php 16 Apr 2007 15:58:53 -0000 1.15 @@ -248,6 +248,8 @@ $encrypt = $_SESSION["encrypt"] ; $passwd = xorstring ($encrypt, $xorstring) ; break ; + case "status": + case "config": case "addclient": case "server": case "chooseclient": @@ -256,8 +258,8 @@ case "delloc": case "addloc": case "scheduler": + case "restore": case "logout": - case "status": $submit=$key ; break ; case "client": @@ -307,13 +309,6 @@ } switch ($submit) { - case "status": - $log = array ('start' => '', 'end' => '') ; - foreach ($config["clients"] as $key => $value) - $log["clients"][$key] = - array ('start' => '', 'failed' => '', 'ok' => '') ; - $log = readlog ($passwd, $log) ; - break ; case "scheduler": $newsched = "" ; foreach ($scheduler as $line) { @@ -418,14 +413,34 @@ $config["clients"][$client]["location"][] = $newconf["newloc"] ; writeconf ($passwd, $config) ; break ; + default: + $log = array ('start' => '', 'end' => '') ; + foreach ($config["clients"] as $key => $value) + $log["clients"][$key] = + array ('start' => '', 'failed' => '', 'ok' => '') ; + $log = readlog ($passwd, $log) ; + break ; } switch ($submit) { - case "status": - $smarty->assign ('log', $log) ; - $smarty->display ('status.tpl') ; + case "restore": + $clients = array_keys($config["clients"]) ; + $smarty->assign ('clients', $clients) ; + if (empty($client)) + $client = $clients[0] ; + $smarty->assign ('client', $client) ; + $smarty->assign ('locations', $config["clients"][$client]["location"]) ; + $smarty->display ('restore.tpl') ; break ; - default: + case "config": + case "addclient": + case "server": + case "chooseclient": + case "delclient": + case "clientconfig": + case "delloc": + case "addloc": + case "scheduler": if ($config["active"]) $smarty->assign ('active', "checked") ; for ($i = 0 ; $i < 60 ; $i += 5) @@ -457,5 +472,9 @@ $smarty->assign ('locations', $config["clients"][$client]["location"]) ; $smarty->display ('config.tpl') ; break ; + default: + $smarty->assign ('log', $log) ; + $smarty->display ('status.tpl') ; + break ; } ?> From finnarne-guest at alioth.debian.org Mon Apr 16 15:58:53 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 15:58:55 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates menu.tpl restore.tpl Message-ID: User: finnarne-guest Date: 07/04/16 15:58:53 Modified: templates menu.tpl Added: templates restore.tpl Log: Added the begining of a restor Made status the default choice if nothing else is detected Revision Changes Path 1.2 +2 -1 slbackup-php/templates/menu.tpl Index: menu.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/menu.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- menu.tpl 13 Apr 2007 20:44:48 -0000 1.1 +++ menu.tpl 16 Apr 2007 15:58:53 -0000 1.2 @@ -22,8 +22,9 @@
    -
  • +
  • +
1.1 slbackup-php/templates/restore.tpl Index: restore.tpl =================================================================== {* slbackup-php, an administration tool for slbackup Copyright (C) 2007 Finn-Arne Johansen , Bzzware AS, Norway This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} {t}SLBackup Configuration{/t} {include file="menu.tpl"}

{t}Client to restore{/t}

{html_options name=client values=$clients output=$clients selected=$client} {t}Locations:{/t} {html_options name=client values=$locations output=$locations selected=$location} From finnarne-guest at alioth.debian.org Mon Apr 16 20:07:49 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 20:07:50 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates status.tpl Message-ID: User: finnarne-guest Date: 07/04/16 20:07:49 Modified: templates status.tpl Log: Print timestamp including time Revision Changes Path 1.2 +5 -5 slbackup-php/templates/status.tpl Index: status.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/status.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- status.tpl 16 Apr 2007 11:45:33 -0000 1.1 +++ status.tpl 16 Apr 2007 20:07:48 -0000 1.2 @@ -30,12 +30,12 @@
  • Status for {$client}
    {if $values.started > $values.ok and $values.started > $values.failed } - Backup started as {$values.started|date_format}, and is still in progress
    + Backup started as {$values.started|date_format:"%c"}, and is still in progress
    {/if} {if $values.ok > $values.failed } - OK at {$values.ok|date_format} + OK at {$values.ok|date_format:"%c"} {elseif $values.failed <> ''} - Failed at {$values.ok|date_format} + Failed at {$values.ok|date_format:"%c"} {elseif $values.started == ''} Client never backed up {/if} @@ -44,9 +44,9 @@

    {t}Backup status{/t}

    - {t 1=$log.end|date_format}Backup last finished at %1{/t}
    + {t 1=$log.end|date_format:"%c"}Backup last finished at %1{/t}
    {if $log.start > $values.end } - {t 1=$log.end|date_format}A new backup started at %1{/t}
    + {t 1=$log.end|date_format:"%c"}A new backup started at %1{/t}
    {/if} From werner at alioth.debian.org Mon Apr 16 20:27:25 2007 From: werner at alioth.debian.org (werner@alioth.debian.org) Date: Mon Apr 16 20:27:28 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog control Message-ID: User: werner Date: 07/04/16 20:27:25 Modified: debian changelog control Log: polish Revision Changes Path 1.10 +2 -0 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- changelog 16 Apr 2007 11:55:57 -0000 1.9 +++ changelog 16 Apr 2007 20:27:25 -0000 1.10 @@ -3,6 +3,8 @@ [ Morten Werner Olsen ] * Added a test in debian/postrm to prevent it from failure. * Added myself as uploader. + * Changed 'todo' in package description to 'not implemented'. + * Polished the Apache config a bit. [ Finn-Arne Johansen ] * Added logout functionality 1.6 +3 -3 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- control 16 Apr 2007 11:52:44 -0000 1.5 +++ control 16 Apr 2007 20:27:25 -0000 1.6 @@ -15,6 +15,6 @@ - schedule the execution of slbackup (through cron) - edit the configuration file - verify that last backup went ok - - restore from backups (todo) - - remove old backups from the repository (todo) - - verify that ssh-keys are working (todo) + - restore from backups (not implemented) + - remove old backups from the repository (not implemented) + - verify that ssh-keys are working (not implemented) From werner at alioth.debian.org Mon Apr 16 20:27:26 2007 From: werner at alioth.debian.org (werner@alioth.debian.org) Date: Mon Apr 16 20:27:28 2007 Subject: [slbackup-commit] CVS update: slbackup-php/etc apache.conf Message-ID: User: werner Date: 07/04/16 20:27:26 Modified: etc apache.conf Log: polish Revision Changes Path 1.2 +12 -11 slbackup-php/etc/apache.conf Index: apache.conf =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/etc/apache.conf,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- apache.conf 13 Apr 2007 09:50:59 -0000 1.1 +++ apache.conf 16 Apr 2007 20:27:26 -0000 1.2 @@ -1,18 +1,19 @@ -Alias /slbackup-php "/usr/share/slbackup-php/web" - - - - RewriteEngine on - RewriteCond %{HTTPS} !^on$ [NC] - RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L] - - - + + + + RewriteEngine on + RewriteCond %{HTTPS} !^on$ [NC] + RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L] + + + +Alias /slbackup-php "/usr/share/slbackup-php/web" - DirectoryIndex index.php index.html + DirectoryIndex index.php Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all + From finnarne-guest at alioth.debian.org Mon Apr 16 21:08:41 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 21:08:42 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/16 21:08:41 Modified: src index.php Log: Added code to browse the backuplocation Revision Changes Path 1.16 +52 -0 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- index.php 16 Apr 2007 15:58:53 -0000 1.15 +++ index.php 16 Apr 2007 21:08:41 -0000 1.16 @@ -20,6 +20,45 @@ +function listloc ($passwd, $clientdir, $location) { +global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; + + $loc = array() ; + $cmd = sprintf ("ssh %s %s@%s find %s/%s -maxdepth 1 -mindepth 1 -type d ", + $ssh_options, $backupuser, + $backuphost, $clientdir, $location) ; + + $desc[0] = array ("pipe", "r") ; + $desc[1] = array ("pipe", "w") ; + $desc[2] = array ("file", "/tmp/error.log", "a") ; + + $env = array ('SSH_ASKPASS' => $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) + $loc["d"][] = trim ($line) ; + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + $cmd = sprintf ("ssh %s %s@%s find %s/%s -maxdepth 1 -mindepth 1 -type f ", + $ssh_options, $backupuser, + $backuphost, $clientdir, $location) ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) + $loc["f"][] = trim ($line) ; + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + + return $loc ; +} + function readcron ($passwd) { global $backuphost, $backupuser, $backupcron, $ssh_options, $ssh_askpass ; @@ -259,6 +298,8 @@ case "addloc": case "scheduler": case "restore": + case "restoreclient": + case "restorelocation": case "logout": $submit=$key ; break ; @@ -413,6 +454,13 @@ $config["clients"][$client]["location"][] = $newconf["newloc"] ; writeconf ($passwd, $config) ; break ; + case "restorelocation": + if (empty($client) || empty ($newconf["location"])) + break ; + $loc = listloc ($passwd, + sprintf ("%s/%s", $config["server_destdir"], $client), + $newconf["location"]); + break ; default: $log = array ('start' => '', 'end' => '') ; foreach ($config["clients"] as $key => $value) @@ -423,6 +471,10 @@ } switch ($submit) { + case "restorelocation": + debug ($loc) ; + $smarty->assign ('loc', $loc) ; + case "restoreclient": case "restore": $clients = array_keys($config["clients"]) ; $smarty->assign ('clients', $clients) ; From finnarne-guest at alioth.debian.org Mon Apr 16 21:08:41 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 21:08:42 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates restore.tpl Message-ID: User: finnarne-guest Date: 07/04/16 21:08:41 Modified: templates restore.tpl Log: Added code to browse the backuplocation Revision Changes Path 1.2 +8 -1 slbackup-php/templates/restore.tpl Index: restore.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/restore.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- restore.tpl 16 Apr 2007 15:58:53 -0000 1.1 +++ restore.tpl 16 Apr 2007 21:08:41 -0000 1.2 @@ -30,8 +30,15 @@ selected=$client} {t}Locations:{/t} - {html_options name=client values=$locations output=$locations + {html_options name=location values=$locations output=$locations selected=$location} +
    + {foreach item=dir name=dir from=$loc.d} + [dir] {$dir}
    + {/foreach} + {foreach item=file name=file from=$loc.f} + [file] {$file}
    + {/foreach} From finnarne-guest at alioth.debian.org Mon Apr 16 21:15:10 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 21:15:11 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/16 21:15:10 Modified: src index.php Log: Not so many slashes in there Revision Changes Path 1.17 +1 -1 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- index.php 16 Apr 2007 21:08:41 -0000 1.16 +++ index.php 16 Apr 2007 21:15:10 -0000 1.17 @@ -24,7 +24,7 @@ global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; $loc = array() ; - $cmd = sprintf ("ssh %s %s@%s find %s/%s -maxdepth 1 -mindepth 1 -type d ", + $cmd = sprintf ("ssh %s %s@%s find %s%s -maxdepth 1 -mindepth 1 -type d ", $ssh_options, $backupuser, $backuphost, $clientdir, $location) ; From finnarne-guest at alioth.debian.org Mon Apr 16 22:16:10 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 22:16:11 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/16 22:16:10 Modified: src index.php Log: Moved xorstring from form into cookie, to allow the use of get, and not only post Revision Changes Path 1.18 +5 -2 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- index.php 16 Apr 2007 21:15:10 -0000 1.17 +++ index.php 16 Apr 2007 22:16:10 -0000 1.18 @@ -276,7 +276,7 @@ # Fetch arguments passed as the script is executed -foreach ($_POST as $key => $value) { +foreach ($_REQUEST as $key => $value) { switch ($key) { case "Passwd": $passwd = $value ; @@ -284,6 +284,8 @@ break ; case "xorstring": $xorstring = $value ; + if (empty ($value)) + break ; $encrypt = $_SESSION["encrypt"] ; $passwd = xorstring ($encrypt, $xorstring) ; break ; @@ -316,6 +318,7 @@ unset ($passwd) ; unset ($xorstring) ; $_SESSION['encrypt'] = "" ; + setcookie ('xorstring', '') ; } if (isset ($passwd)) @@ -334,7 +337,7 @@ $xorstring = xorstring ($encrypt, $passwd) ; } -$smarty->assign ('xorstring', $xorstring) ; +setcookie ('xorstring', $xorstring) ; $scheduler = readcron ($passwd) ; From finnarne-guest at alioth.debian.org Mon Apr 16 22:16:10 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 22:16:11 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates config.tpl menu.tpl restore.tpl Message-ID: User: finnarne-guest Date: 07/04/16 22:16:10 Modified: templates config.tpl menu.tpl restore.tpl Log: Moved xorstring from form into cookie, to allow the use of get, and not only post Revision Changes Path 1.6 +0 -1 slbackup-php/templates/config.tpl Index: config.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/config.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- config.tpl 13 Apr 2007 20:44:48 -0000 1.5 +++ config.tpl 16 Apr 2007 22:16:10 -0000 1.6 @@ -24,7 +24,6 @@ {include file="menu.tpl"}
    -

    {t}Server scheduler{/t}

    {t}Backup enabled{/t} 1.3 +0 -1 slbackup-php/templates/menu.tpl Index: menu.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/menu.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- menu.tpl 16 Apr 2007 15:58:53 -0000 1.2 +++ menu.tpl 16 Apr 2007 22:16:10 -0000 1.3 @@ -20,7 +20,6 @@ -
    • 1.3 +0 -1 slbackup-php/templates/restore.tpl Index: restore.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/restore.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- restore.tpl 16 Apr 2007 21:08:41 -0000 1.2 +++ restore.tpl 16 Apr 2007 22:16:10 -0000 1.3 @@ -24,7 +24,6 @@ {include file="menu.tpl"} -

      {t}Client to restore{/t}

      {html_options name=client values=$clients output=$clients selected=$client} From finnarne-guest at alioth.debian.org Mon Apr 16 22:47:11 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 22:47:12 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/16 22:47:11 Modified: src index.php Log: Try to get better browsing Revision Changes Path 1.19 +9 -5 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- index.php 16 Apr 2007 22:16:10 -0000 1.18 +++ index.php 16 Apr 2007 22:47:11 -0000 1.19 @@ -24,9 +24,9 @@ global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; $loc = array() ; - $cmd = sprintf ("ssh %s %s@%s find %s%s -maxdepth 1 -mindepth 1 -type d ", + $cmd = sprintf ("ssh %s %s@%s 'find %s%s -maxdepth 1 -mindepth 1 -type d -printf \"%s\"'", $ssh_options, $backupuser, - $backuphost, $clientdir, $location) ; + $backuphost, $clientdir, $location, '%P\n') ; $desc[0] = array ("pipe", "r") ; $desc[1] = array ("pipe", "w") ; @@ -39,7 +39,9 @@ fprintf ($pipes[0], "%s\n", $passwd) ; fclose ($pipes[0]) ; while ($line = fgets ($pipes[1], 1024)) - $loc["d"][] = trim ($line) ; + $loc[] = array ('type' => 'dir', + 'name' => basename (trim($line)), + 'path' => trim ($line)) ; fclose ($pipes[1]) ; proc_close ($proc) ; } @@ -51,7 +53,9 @@ fprintf ($pipes[0], "%s\n", $passwd) ; fclose ($pipes[0]) ; while ($line = fgets ($pipes[1], 1024)) - $loc["f"][] = trim ($line) ; + $loc[] = array ('type' => 'files', + 'name' => basename (trim($line)), + 'path' => trim ($line)) ; fclose ($pipes[1]) ; proc_close ($proc) ; } @@ -475,8 +479,8 @@ switch ($submit) { case "restorelocation": - debug ($loc) ; $smarty->assign ('loc', $loc) ; + $smarty->assign ('location', $loctions) ; case "restoreclient": case "restore": $clients = array_keys($config["clients"]) ; From finnarne-guest at alioth.debian.org Mon Apr 16 22:47:11 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 22:47:12 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates restore.tpl Message-ID: User: finnarne-guest Date: 07/04/16 22:47:11 Modified: templates restore.tpl Log: Try to get better browsing Revision Changes Path 1.4 +4 -5 slbackup-php/templates/restore.tpl Index: restore.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/restore.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- restore.tpl 16 Apr 2007 22:16:10 -0000 1.3 +++ restore.tpl 16 Apr 2007 22:47:11 -0000 1.4 @@ -33,11 +33,10 @@ selected=$location}
      - {foreach item=dir name=dir from=$loc.d} - [dir] {$dir}
      - {/foreach} - {foreach item=file name=file from=$loc.f} - [file] {$file}
      + {foreach item=dir name=dir from=$loc} + [{$dir.type}] + {$dir.name} +
      {/foreach} From finnarne-guest at alioth.debian.org Mon Apr 16 23:49:15 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 23:49:16 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates menu.tpl Message-ID: User: finnarne-guest Date: 07/04/16 23:49:14 Modified: templates menu.tpl Log: Use get instead of post, to allow for links instead of buttons Revision Changes Path 1.4 +4 -4 slbackup-php/templates/menu.tpl Index: menu.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/menu.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- menu.tpl 16 Apr 2007 22:16:10 -0000 1.3 +++ menu.tpl 16 Apr 2007 23:49:14 -0000 1.4 @@ -21,10 +21,10 @@
      From finnarne-guest at alioth.debian.org Mon Apr 16 23:49:50 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 23:49:51 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates config.tpl Message-ID: User: finnarne-guest Date: 07/04/16 23:49:50 Modified: templates config.tpl Log: Specify action to clean up the command-line Revision Changes Path 1.7 +1 -1 slbackup-php/templates/config.tpl Index: config.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/config.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- config.tpl 16 Apr 2007 22:16:10 -0000 1.6 +++ config.tpl 16 Apr 2007 23:49:49 -0000 1.7 @@ -23,7 +23,7 @@ {include file="menu.tpl"} -
      +

      {t}Server scheduler{/t}

      {t}Backup enabled{/t} From finnarne-guest at alioth.debian.org Mon Apr 16 23:50:38 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Mon Apr 16 23:50:39 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates login.tpl Message-ID: User: finnarne-guest Date: 07/04/16 23:50:38 Modified: templates login.tpl Log: Specify action to clean up the command-line Revision Changes Path 1.3 +1 -1 slbackup-php/templates/login.tpl Index: login.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/login.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- login.tpl 13 Apr 2007 10:51:07 -0000 1.2 +++ login.tpl 16 Apr 2007 23:50:38 -0000 1.3 @@ -21,7 +21,7 @@ {t}SLBackup Configuration{/t} - + {t 1=$backupuser 2=$backuphost}To read the configuration, you must log in as %1 on %2.{/t}
      {t 1=$backupuser 2=$backuphost}Please enter the password for the %1 account on %2:{/t}

      From finnarne-guest at alioth.debian.org Tue Apr 17 00:13:24 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 00:13:25 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/17 00:13:24 Modified: src index.php Log: Now the browsing works for folders, only file restoring left Revision Changes Path 1.20 +38 -13 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- index.php 16 Apr 2007 22:47:11 -0000 1.19 +++ index.php 17 Apr 2007 00:13:24 -0000 1.20 @@ -20,13 +20,25 @@ -function listloc ($passwd, $clientdir, $location) { +function listloc ($passwd, $clientdir, $location, $sub = "") { global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; $loc = array() ; - $cmd = sprintf ("ssh %s %s@%s 'find %s%s -maxdepth 1 -mindepth 1 -type d -printf \"%s\"'", + $parent = dirname ($sub) ; + if (!empty($sub)) { + if ($parent == ".") $parent="" ; + $loc[] = array ('type' => 'parent', + 'name' => "Parent directory", + 'sub' => trim ($parent)) ; + } + + $cmd = sprintf ("ssh %s %s@%s 'find %s%s/%s -maxdepth 1 -mindepth 1 -type d'", + $ssh_options, $backupuser, + $backuphost, $clientdir, $location, $sub ) ; + + $cmd = sprintf ("ssh %s %s@%s 'find %s%s/%s -maxdepth 1 -mindepth 1 -type d'", $ssh_options, $backupuser, - $backuphost, $clientdir, $location, '%P\n') ; + $backuphost, $clientdir, $location, $sub ) ; $desc[0] = array ("pipe", "r") ; $desc[1] = array ("pipe", "w") ; @@ -38,24 +50,26 @@ if (is_resource ($proc)) { fprintf ($pipes[0], "%s\n", $passwd) ; fclose ($pipes[0]) ; - while ($line = fgets ($pipes[1], 1024)) + while ($line = fgets ($pipes[1], 1024)) { $loc[] = array ('type' => 'dir', 'name' => basename (trim($line)), - 'path' => trim ($line)) ; + 'sub' => substr (trim ($line), strlen ($clientdir) + strlen ($location) + 1)) ; + + } fclose ($pipes[1]) ; proc_close ($proc) ; } - $cmd = sprintf ("ssh %s %s@%s find %s/%s -maxdepth 1 -mindepth 1 -type f ", + $cmd = sprintf ("ssh %s %s@%s find %s/%s/%s -maxdepth 1 -mindepth 1 -type f ", $ssh_options, $backupuser, - $backuphost, $clientdir, $location) ; + $backuphost, $clientdir, $location, $sub) ; $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; if (is_resource ($proc)) { fprintf ($pipes[0], "%s\n", $passwd) ; fclose ($pipes[0]) ; while ($line = fgets ($pipes[1], 1024)) - $loc[] = array ('type' => 'files', + $loc[] = array ('type' => 'file', 'name' => basename (trim($line)), - 'path' => trim ($line)) ; + 'sub' => trim ($line)) ; fclose ($pipes[1]) ; proc_close ($proc) ; } @@ -282,6 +296,11 @@ # Fetch arguments passed as the script is executed foreach ($_REQUEST as $key => $value) { switch ($key) { + case "smarty_templ": + case "smarty_compile": + case "locale": + case "PHPSESSID": + break ; case "Passwd": $passwd = $value ; $submit = "status" ; @@ -464,9 +483,15 @@ case "restorelocation": if (empty($client) || empty ($newconf["location"])) break ; - $loc = listloc ($passwd, - sprintf ("%s/%s", $config["server_destdir"], $client), - $newconf["location"]); + if (empty($newconf["sub"])) + $loc = listloc ($passwd, + sprintf ("%s/%s", $config["server_destdir"], $client), + $newconf["location"]) ; + else + $loc = listloc ($passwd, + sprintf ("%s/%s", $config["server_destdir"], $client), + $newconf["location"], $newconf["sub"]) ; + break ; default: $log = array ('start' => '', 'end' => '') ; @@ -480,7 +505,7 @@ switch ($submit) { case "restorelocation": $smarty->assign ('loc', $loc) ; - $smarty->assign ('location', $loctions) ; + $smarty->assign ('location', $newconf["location"]) ; case "restoreclient": case "restore": $clients = array_keys($config["clients"]) ; From finnarne-guest at alioth.debian.org Tue Apr 17 00:13:24 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 00:13:25 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates restore.tpl Message-ID: User: finnarne-guest Date: 07/04/17 00:13:24 Modified: templates restore.tpl Log: Now the browsing works for folders, only file restoring left Revision Changes Path 1.5 +13 -3 slbackup-php/templates/restore.tpl Index: restore.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/restore.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- restore.tpl 16 Apr 2007 22:47:11 -0000 1.4 +++ restore.tpl 17 Apr 2007 00:13:24 -0000 1.5 @@ -23,7 +23,7 @@ {include file="menu.tpl"} - +

      {t}Client to restore{/t}

      {html_options name=client values=$clients output=$clients selected=$client} @@ -34,8 +34,18 @@
      {foreach item=dir name=dir from=$loc} - [{$dir.type}] - {$dir.name} + {if $dir.type == "parent"} + [DIR] + {elseif $dir.type == "dir"} + [DIR] + {else} + [   ] + {/if} + {if $dir.type == "file"} + {$dir.name} + {else} + {$dir.name} + {/if}
      {/foreach} From finnarne-guest at alioth.debian.org Tue Apr 17 00:30:26 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 00:30:28 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/17 00:30:26 Modified: src index.php Log: Now It's almost possible to fetch a file from the backup Revision Changes Path 1.21 +40 -7 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- index.php 17 Apr 2007 00:13:24 -0000 1.20 +++ index.php 17 Apr 2007 00:30:26 -0000 1.21 @@ -20,6 +20,32 @@ +function fetchfile ($passwd, $clientdir, $location, $file) { +global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; + + $out= "" ; + $cmd = sprintf ("ssh %s %s@%s 'cat %s%s/%s'", + $ssh_options, $backupuser, + $backuphost, $clientdir, $location, $file ) ; + + $desc[0] = array ("pipe", "r") ; + $desc[1] = array ("pipe", "w") ; + $desc[2] = array ("file", "/tmp/error.log", "a") ; + + $env = array ('SSH_ASKPASS' => $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) + $out .= $line ; + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + return $out ; +} + function listloc ($passwd, $clientdir, $location, $sub = "") { global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; @@ -36,10 +62,6 @@ $ssh_options, $backupuser, $backuphost, $clientdir, $location, $sub ) ; - $cmd = sprintf ("ssh %s %s@%s 'find %s%s/%s -maxdepth 1 -mindepth 1 -type d'", - $ssh_options, $backupuser, - $backuphost, $clientdir, $location, $sub ) ; - $desc[0] = array ("pipe", "r") ; $desc[1] = array ("pipe", "w") ; $desc[2] = array ("file", "/tmp/error.log", "a") ; @@ -59,9 +81,10 @@ fclose ($pipes[1]) ; proc_close ($proc) ; } - $cmd = sprintf ("ssh %s %s@%s find %s/%s/%s -maxdepth 1 -mindepth 1 -type f ", + $cmd = sprintf ("ssh %s %s@%s 'find %s%s/%s -maxdepth 1 -mindepth 1 -type f'", $ssh_options, $backupuser, - $backuphost, $clientdir, $location, $sub) ; + $backuphost, $clientdir, $location, $sub ) ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; if (is_resource ($proc)) { fprintf ($pipes[0], "%s\n", $passwd) ; @@ -69,7 +92,8 @@ while ($line = fgets ($pipes[1], 1024)) $loc[] = array ('type' => 'file', 'name' => basename (trim($line)), - 'sub' => trim ($line)) ; + 'sub' => substr (trim ($line), strlen ($clientdir) + strlen ($location) + 1)) ; + fclose ($pipes[1]) ; proc_close ($proc) ; } @@ -325,6 +349,7 @@ case "restore": case "restoreclient": case "restorelocation": + case "restorefile": case "logout": $submit=$key ; break ; @@ -480,6 +505,14 @@ $config["clients"][$client]["location"][] = $newconf["newloc"] ; writeconf ($passwd, $config) ; break ; + case "restorefile": + if (empty($client) || empty ($newconf["location"])) + break ; + debug (fetchfile ($passwd, + sprintf ("%s/%s", $config["server_destdir"], $client), + $newconf["location"], $newconf["file"])) ; + + break ; case "restorelocation": if (empty($client) || empty ($newconf["location"])) break ; From finnarne-guest at alioth.debian.org Tue Apr 17 00:56:55 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 00:56:56 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/17 00:56:55 Modified: src index.php Log: Set headers to make the file appear correct Revision Changes Path 1.22 +9 -7 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- index.php 17 Apr 2007 00:30:26 -0000 1.21 +++ index.php 17 Apr 2007 00:56:55 -0000 1.22 @@ -23,7 +23,6 @@ function fetchfile ($passwd, $clientdir, $location, $file) { global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; - $out= "" ; $cmd = sprintf ("ssh %s %s@%s 'cat %s%s/%s'", $ssh_options, $backupuser, $backuphost, $clientdir, $location, $file ) ; @@ -38,11 +37,10 @@ if (is_resource ($proc)) { fprintf ($pipes[0], "%s\n", $passwd) ; fclose ($pipes[0]) ; - while ($line = fgets ($pipes[1], 1024)) - $out .= $line ; + $out = stream_get_contents($pipes[1]) ; fclose ($pipes[1]) ; proc_close ($proc) ; - } + } else unset ($out) ; return $out ; } @@ -508,11 +506,15 @@ case "restorefile": if (empty($client) || empty ($newconf["location"])) break ; - debug (fetchfile ($passwd, + $out = fetchfile ($passwd, sprintf ("%s/%s", $config["server_destdir"], $client), - $newconf["location"], $newconf["file"])) ; + $newconf["location"], $newconf["file"]) ; - break ; + header ('Content-Type: binary/raw') ; + header ('Content-Length: ' . strlen ($out)) ; + header (sprintf ("Content-Disposition: attachment; filename=\"%s\"", basename ($newconf["file"]))) ; + echo $out ; + return ; case "restorelocation": if (empty($client) || empty ($newconf["location"])) break ; From finnarne-guest at alioth.debian.org Tue Apr 17 01:02:56 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 01:02:57 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog control Message-ID: User: finnarne-guest Date: 07/04/17 01:02:56 Modified: debian changelog control Log: Finished restore of a file, maybe it's time to release another package soon Revision Changes Path 1.11 +2 -1 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- changelog 16 Apr 2007 20:27:25 -0000 1.10 +++ changelog 17 Apr 2007 01:02:56 -0000 1.11 @@ -9,8 +9,9 @@ [ Finn-Arne Johansen ] * Added logout functionality * Added a status-page + * Added restore of single-files - -- Finn-Arne Johansen Mon, 16 Apr 2007 13:55:08 +0200 + -- Finn-Arne Johansen Tue, 17 Apr 2007 02:56:50 +0200 slbackup-php (0.0.1) unstable; urgency=low 1.7 +1 -1 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- control 16 Apr 2007 20:27:25 -0000 1.6 +++ control 17 Apr 2007 01:02:56 -0000 1.7 @@ -15,6 +15,6 @@ - schedule the execution of slbackup (through cron) - edit the configuration file - verify that last backup went ok - - restore from backups (not implemented) + - restore from backups - remove old backups from the repository (not implemented) - verify that ssh-keys are working (not implemented) From finnarne-guest at alioth.debian.org Tue Apr 17 01:02:56 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 01:02:57 2007 Subject: [slbackup-commit] CVS update: slbackup-php/po nb_NO.po slbackup-php.pot Message-ID: User: finnarne-guest Date: 07/04/17 01:02:56 Modified: po nb_NO.po slbackup-php.pot Log: Finished restore of a file, maybe it's time to release another package soon Revision Changes Path 1.2 +71 -16 slbackup-php/po/nb_NO.po Index: nb_NO.po =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/nb_NO.po,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- nb_NO.po 13 Apr 2007 14:13:31 -0000 1.1 +++ nb_NO.po 17 Apr 2007 01:02:56 -0000 1.2 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: slbackup 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-13 13:02+0200\n" +"POT-Creation-Date: 2007-04-17 02:58+0200\n" "PO-Revision-Date: 2007-04-13 16:05+0200\n" "Last-Translator: Finn-Arne Johansen\n" "Language-Team: Norsk bokm??l\n" @@ -16,8 +16,10 @@ "Content-Transfer-Encoding: 8bit\n" #. templates/config.tpl +#. templates/restore.tpl +#. templates/status.tpl #. templates/login.tpl -#: standard input:2 standard input:80 +#: standard input:2 input:80 input:95 input:110 msgid "SLBackup Configuration" msgstr "SLBackup Konfigurasjon" @@ -37,13 +39,13 @@ msgstr "Kj??r backup klokken" #. templates/config.tpl -#: standard input:14 standard input:35 src/index.php:389 +#: standard input:14 input:35 src/index.php:590 msgid "Update" msgstr "Oppdater" #. templates/config.tpl #. templates/login.tpl -#: standard input:17 standard input:38 standard input:68 standard input:92 +#: standard input:17 input:38 input:68 input:122 msgid "Reset" msgstr "Nullstill" @@ -53,7 +55,7 @@ msgstr "Konfigurasjon for server" #. templates/config.tpl -#: standard input:23 standard input:56 +#: standard input:23 input:56 msgid "Address" msgstr "Adresse" @@ -68,7 +70,7 @@ msgstr "Type" #. templates/config.tpl -#: standard input:32 standard input:65 +#: standard input:32 input:65 msgid "User" msgstr "Bruker" @@ -83,7 +85,8 @@ msgstr "Klient:" #. templates/config.tpl -#: standard input:47 +#. templates/restore.tpl +#: standard input:47 input:86 msgid "Choose" msgstr "Velg" @@ -108,12 +111,13 @@ msgstr "Type" #. templates/config.tpl -#: standard input:71 +#. templates/restore.tpl +#: standard input:71 input:89 msgid "Locations:" msgstr "Kataloger:" #. templates/config.tpl -#: standard input:74 src/index.php:387 +#: standard input:74 src/index.php:588 msgid "Add" msgstr "Legg til" @@ -122,32 +126,83 @@ msgid "Delete" msgstr "Slett" -#. templates/login.tpl +#. templates/restore.tpl #: standard input:83 +msgid "Client to restore" +msgstr "Klient som skal gjenskapes" + +#. templates/restore.tpl +#: standard input:92 +msgid "Browse" +msgstr "Bla" + +#. templates/status.tpl +#: standard input:98 +msgid "Clients" +msgstr "Klient" + +#. templates/status.tpl +#: standard input:101 +msgid "Backup status" +msgstr "Status for Sikkerhetskopiering" + +#. templates/status.tpl +#: standard input:104 +msgid "Backup last finished at %1" +msgstr "Sikkerhetskopiering ble fullf??rt %1" + +#. templates/status.tpl +#: standard input:107 +msgid "A new backup started at %1" +msgstr "En ny sikkerhetskopieringsjobb ble startet %1" + +#. templates/login.tpl +#: standard input:113 msgid "To read the configuration, you must log in as %1 on %2." -msgstr "For ?? se p?? konfigurasjonen, m?? du logge inn som bruker %1 p?? maskinen %2" +msgstr "Du m?? logge inn som bruker %1 p?? %2 for ?? lese konfigurasjonene" +"For ?? se p?? konfigurasjonen, m?? du logge inn som bruker %1 p?? maskinen %2" #. templates/login.tpl -#: standard input:86 +#: standard input:116 msgid "Please enter the password for the %1 account on %2:" msgstr "Legg inn passordet for bruker %1 p?? %2:" #. templates/login.tpl -#: standard input:89 +#: standard input:119 msgid "Login" msgstr "Logg inn" -#: src/index.php:305 +#. templates/menu.tpl +#: standard input:125 +msgid "Status" +msgstr "Status" + +#. templates/menu.tpl +#: standard input:128 +msgid "Config" +msgstr "Konfigurasjon" + +#. templates/menu.tpl +#: standard input:131 +msgid "Restore" +msgstr "Gjennopprett" + +#. templates/menu.tpl +#: standard input:134 +msgid "Logout" +msgstr "Log ut" + +#: src/index.php:451 #, php-format msgid "No client specified :(" msgstr "Ingen klient ble valgt ?? slette" -#: src/index.php:310 +#: src/index.php:456 #, php-format msgid "Unable to find %s in the list of clients." msgstr "Fant ikke klienten %s i listen." -#: src/index.php:344 +#: src/index.php:490 #, php-format msgid "Unable to find %s in the locations of %s." msgstr "Finner ikke %s i listen av kataloger." 1.4 +67 -13 slbackup-php/po/slbackup-php.pot Index: slbackup-php.pot =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/slbackup-php.pot,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- slbackup-php.pot 13 Apr 2007 11:03:04 -0000 1.3 +++ slbackup-php.pot 17 Apr 2007 01:02:56 -0000 1.4 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-13 13:02+0200\n" +"POT-Creation-Date: 2007-04-17 02:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,8 +17,10 @@ "Content-Transfer-Encoding: 8bit\n" #. templates/config.tpl +#. templates/restore.tpl +#. templates/status.tpl #. templates/login.tpl -#: standard input:2 standard input:80 +#: standard input:2 standard input:80 standard input:95 standard input:110 msgid "SLBackup Configuration" msgstr "" @@ -38,13 +40,13 @@ msgstr "" #. templates/config.tpl -#: standard input:14 standard input:35 src/index.php:389 +#: standard input:14 standard input:35 src/index.php:590 msgid "Update" msgstr "" #. templates/config.tpl #. templates/login.tpl -#: standard input:17 standard input:38 standard input:68 standard input:92 +#: standard input:17 standard input:38 standard input:68 standard input:122 msgid "Reset" msgstr "" @@ -84,7 +86,8 @@ msgstr "" #. templates/config.tpl -#: standard input:47 +#. templates/restore.tpl +#: standard input:47 standard input:86 msgid "Choose" msgstr "" @@ -109,12 +112,13 @@ msgstr "" #. templates/config.tpl -#: standard input:71 +#. templates/restore.tpl +#: standard input:71 standard input:89 msgid "Locations:" msgstr "" #. templates/config.tpl -#: standard input:74 src/index.php:387 +#: standard input:74 src/index.php:588 msgid "Add" msgstr "" @@ -123,32 +127,82 @@ msgid "Delete" msgstr "" -#. templates/login.tpl +#. templates/restore.tpl #: standard input:83 +msgid "Client to restore" +msgstr "" + +#. templates/restore.tpl +#: standard input:92 +msgid "Browse" +msgstr "" + +#. templates/status.tpl +#: standard input:98 +msgid "Clients" +msgstr "" + +#. templates/status.tpl +#: standard input:101 +msgid "Backup status" +msgstr "" + +#. templates/status.tpl +#: standard input:104 +msgid "Backup last finished at %1" +msgstr "" + +#. templates/status.tpl +#: standard input:107 +msgid "A new backup started at %1" +msgstr "" + +#. templates/login.tpl +#: standard input:113 msgid "To read the configuration, you must log in as %1 on %2." msgstr "" #. templates/login.tpl -#: standard input:86 +#: standard input:116 msgid "Please enter the password for the %1 account on %2:" msgstr "" #. templates/login.tpl -#: standard input:89 +#: standard input:119 msgid "Login" msgstr "" -#: src/index.php:305 +#. templates/menu.tpl +#: standard input:125 +msgid "Status" +msgstr "" + +#. templates/menu.tpl +#: standard input:128 +msgid "Config" +msgstr "" + +#. templates/menu.tpl +#: standard input:131 +msgid "Restore" +msgstr "" + +#. templates/menu.tpl +#: standard input:134 +msgid "Logout" +msgstr "" + +#: src/index.php:451 #, php-format msgid "No client specified :(" msgstr "" -#: src/index.php:310 +#: src/index.php:456 #, php-format msgid "Unable to find %s in the list of clients." msgstr "" -#: src/index.php:344 +#: src/index.php:490 #, php-format msgid "Unable to find %s in the locations of %s." msgstr "" From finnarne-guest at alioth.debian.org Tue Apr 17 01:09:32 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 01:09:34 2007 Subject: [slbackup-commit] CVS update: slbackup-php/po nb_NO.po Message-ID: User: finnarne-guest Date: 07/04/17 01:09:32 Modified: po nb_NO.po Log: Translated a bit to much... Revision Changes Path 1.3 +2 -2 slbackup-php/po/nb_NO.po Index: nb_NO.po =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/nb_NO.po,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- nb_NO.po 17 Apr 2007 01:02:56 -0000 1.2 +++ nb_NO.po 17 Apr 2007 01:09:32 -0000 1.3 @@ -8,7 +8,7 @@ "Project-Id-Version: slbackup 0.0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-04-17 02:58+0200\n" -"PO-Revision-Date: 2007-04-13 16:05+0200\n" +"PO-Revision-Date: 2007-04-17 03:05+0200\n" "Last-Translator: Finn-Arne Johansen\n" "Language-Team: Norsk bokm??l\n" "MIME-Version: 1.0\n" @@ -159,7 +159,7 @@ #. templates/login.tpl #: standard input:113 msgid "To read the configuration, you must log in as %1 on %2." -msgstr "Du m?? logge inn som bruker %1 p?? %2 for ?? lese konfigurasjonene" +msgstr "" "For ?? se p?? konfigurasjonen, m?? du logge inn som bruker %1 p?? maskinen %2" #. templates/login.tpl From finnarne-guest at alioth.debian.org Tue Apr 17 01:09:32 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 01:09:34 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/17 01:09:32 Modified: src index.php Log: Translated a bit to much... Revision Changes Path 1.23 +1 -1 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- index.php 17 Apr 2007 00:56:55 -0000 1.22 +++ index.php 17 Apr 2007 01:09:32 -0000 1.23 @@ -514,7 +514,7 @@ header ('Content-Length: ' . strlen ($out)) ; header (sprintf ("Content-Disposition: attachment; filename=\"%s\"", basename ($newconf["file"]))) ; echo $out ; - return ; + exit ; case "restorelocation": if (empty($client) || empty ($newconf["location"])) break ; From werner at alioth.debian.org Tue Apr 17 04:44:05 2007 From: werner at alioth.debian.org (werner@alioth.debian.org) Date: Tue Apr 17 04:44:06 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog links postinst postrm prerm Message-ID: User: werner Date: 07/04/17 04:44:05 Modified: debian changelog links postinst postrm prerm Log: moving apache config to conf.d/ Revision Changes Path 1.12 +1 -0 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- changelog 17 Apr 2007 01:02:56 -0000 1.11 +++ changelog 17 Apr 2007 04:44:05 -0000 1.12 @@ -5,6 +5,7 @@ * Added myself as uploader. * Changed 'todo' in package description to 'not implemented'. * Polished the Apache config a bit. + * Change from using sites-available/ to conf.d/ for Apache config. [ Finn-Arne Johansen ] * Added logout functionality 1.3 +1 -1 slbackup-php/debian/links Index: links =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/links,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- links 13 Apr 2007 10:00:55 -0000 1.2 +++ links 17 Apr 2007 04:44:05 -0000 1.3 @@ -1 +1 @@ -etc/slbackup-php/apache.conf etc/apache2/sites-available/slbackup +etc/slbackup-php/apache.conf etc/apache2/conf.d/slbackup 1.2 +1 -11 slbackup-php/debian/postinst Index: postinst =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postinst,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- postinst 13 Apr 2007 09:41:33 -0000 1.1 +++ postinst 17 Apr 2007 04:44:05 -0000 1.2 @@ -4,17 +4,7 @@ . /usr/share/debconf/confmodule -if [ -x /usr/sbin/a2ensite ] && [ -x /usr/sbin/a2enmod ]; then - /usr/sbin/a2ensite slbackup >/dev/null - /usr/sbin/a2enmod rewrite > /dev/null - if [ -x /usr/sbin/invoke-rc.d ] ; then - /usr/sbin/invoke-rc.d apache2 force-reload || : - else - [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || : - fi -else - echo "Can't detect apache2 package and therefore not enabling the site" -fi +# should we do a2dissite when upgrading from 0.0.1?? mkdir -p /var/spool/slbackup-php 1.3 +1 -1 slbackup-php/debian/postrm Index: postrm =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postrm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- postrm 13 Apr 2007 21:29:23 -0000 1.2 +++ postrm 17 Apr 2007 04:44:05 -0000 1.3 @@ -2,7 +2,7 @@ set -e -if [ -d /var/spool/slbackup-php ]; do +if [ -d /var/spool/slbackup-php ]; then rm -rf /var/spool/slbackup-php/ fi 1.2 +3 -10 slbackup-php/debian/prerm Index: prerm =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/prerm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- prerm 13 Apr 2007 09:41:33 -0000 1.1 +++ prerm 17 Apr 2007 04:44:05 -0000 1.2 @@ -2,15 +2,8 @@ set -e -if [ -x /usr/sbin/a2dissite ] && [ -L /etc/apache2/sites-enabled/slbackup-php ] ; then - /usr/sbin/a2dissite slbackup-php >/dev/null - if [ -x "`which invoke-rc.d 2>/dev/null`" ] ; then - /usr/sbin/invoke-rc.d apache2 force-reload || : - else - [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || : - fi -else - echo "Can't detect apache2-common, so don't disabling slbackup-php." -fi +# Should we reload apache on removal to remove config? +# (in that case this block should be moved to postrm and +# apache should only be reloaeded if the users did say it was ok?) #DEBHELPER# From finnarne-guest at alioth.debian.org Tue Apr 17 05:57:52 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 05:57:54 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/17 05:57:52 Modified: src index.php Log: Handle timed out sessions better Revision Changes Path 1.24 +3 -1 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- index.php 17 Apr 2007 01:09:32 -0000 1.23 +++ index.php 17 Apr 2007 05:57:52 -0000 1.24 @@ -328,7 +328,9 @@ $submit = "status" ; break ; case "xorstring": - $xorstring = $value ; + if (empty($passwd)) + $xorstring = $value ; + else break ; if (empty ($value)) break ; $encrypt = $_SESSION["encrypt"] ; From finnarne-guest at alioth.debian.org Tue Apr 17 06:15:26 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 06:15:27 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php sl-style.css Message-ID: User: finnarne-guest Date: 07/04/17 06:15:26 Modified: src index.php Added: src sl-style.css Log: revert the timestamp string, to make it use the most significant values Revision Changes Path 1.25 +1 -1 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- index.php 17 Apr 2007 05:57:52 -0000 1.24 +++ index.php 17 Apr 2007 06:15:26 -0000 1.25 @@ -380,7 +380,7 @@ } if (empty($encrypt) || empty ($xorstring)) { - $encrypt = crypt(sprintf (gettimeofday (true))) ; + $encrypt = crypt(strrev(sprintf (gettimeofday (true)))) ; $_SESSION['encrypt'] = $encrypt ; $xorstring = xorstring ($encrypt, $passwd) ; } 1.1 slbackup-php/src/sl-style.css Index: sl-style.css =================================================================== body { color: black; background: #F5F5E5; padding: 1ex; background-position: top right; } h1 { text-align: center; letter-spacing: 0.2em; font-family: serif; font-size: 2em; font-variant: small-caps; } h2 { color: #881133; } h2.menu { color: #6699BB; background: #E5FAFF; text-align: right; font-family: serif; font-size: 1.5em; font-variant: small-caps; padding-right: 1ex; } body>div.hbar { background: #991111; width: 100%; height: 1ex; } div.body { margin-top: 1ex; padding-left: 1ex; padding-right: 1em; padding-top: 1em; padding-bottom: 1ex; margin-right: 26ex; } div.menu { background: #CCEEF5; margin-top: 1ex; padding: 1px 5px 2em; line-height: 1.3; float: right; position: fixed; width: 25ex; top: 1em; right: 1em; bottom: auto; left: auto; } a:link { font-weight: bold; } a:active { text-decoration: overline; } a:visited { font-weight: bold; } @media print { div.menu {visibility: hidden} div.body {margin-right: 2ex} } From finnarne-guest at alioth.debian.org Tue Apr 17 06:18:58 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 06:18:59 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates config.tpl header.tpl login.tpl menu.tpl restore.tpl status.tpl Message-ID: User: finnarne-guest Date: 07/04/17 06:18:58 Modified: templates config.tpl login.tpl restore.tpl status.tpl Added: templates header.tpl Removed: templates menu.tpl Log: Added stylesheet, to get the menu in correct place Revision Changes Path 1.8 +1 -6 slbackup-php/templates/config.tpl Index: config.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/config.tpl,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- config.tpl 16 Apr 2007 23:49:49 -0000 1.7 +++ config.tpl 17 Apr 2007 06:18:58 -0000 1.8 @@ -16,12 +16,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} - - - {t}SLBackup Configuration{/t} - - - {include file="menu.tpl"} + {include file="header.tpl"}

      {t}Server scheduler{/t}

      1.4 +1 -5 slbackup-php/templates/login.tpl Index: login.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/login.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- login.tpl 16 Apr 2007 23:50:38 -0000 1.3 +++ login.tpl 17 Apr 2007 06:18:58 -0000 1.4 @@ -16,11 +16,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} - - - {t}SLBackup Configuration{/t} - - + {include file="header.tpl"} {t 1=$backupuser 2=$backuphost}To read the configuration, you must log in as %1 on %2.{/t}
      {t 1=$backupuser 2=$backuphost}Please enter the password for the %1 account on %2:{/t}
      1.6 +1 -6 slbackup-php/templates/restore.tpl Index: restore.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/restore.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- restore.tpl 17 Apr 2007 00:13:24 -0000 1.5 +++ restore.tpl 17 Apr 2007 06:18:58 -0000 1.6 @@ -16,12 +16,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} - - - {t}SLBackup Configuration{/t} - - - {include file="menu.tpl"} + {include file="header.tpl"}

      {t}Client to restore{/t}

      1.3 +1 -7 slbackup-php/templates/status.tpl Index: status.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/status.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- status.tpl 16 Apr 2007 20:07:48 -0000 1.2 +++ status.tpl 17 Apr 2007 06:18:58 -0000 1.3 @@ -16,13 +16,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} - - - {t}SLBackup Configuration{/t} - - - - {include file="menu.tpl"} + {include file="header.tpl"}

      {t}Clients{/t}

        1.1 slbackup-php/templates/header.tpl Index: header.tpl =================================================================== {* slbackup-php, an administration tool for slbackup Copyright (C) 2007 Finn-Arne Johansen , Bzzware AS, Norway This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} {t}SLBackup Configuration{/t} From finnarne-guest at alioth.debian.org Tue Apr 17 09:24:37 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 09:24:39 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog control Message-ID: User: finnarne-guest Date: 07/04/17 09:24:37 Modified: debian changelog control Log: added maintenance (cleanup) of old backups Revision Changes Path 1.13 +2 -1 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- changelog 17 Apr 2007 04:44:05 -0000 1.12 +++ changelog 17 Apr 2007 09:24:37 -0000 1.13 @@ -11,8 +11,9 @@ * Added logout functionality * Added a status-page * Added restore of single-files + * Added maintenance functionality (remove old backups) - -- Finn-Arne Johansen Tue, 17 Apr 2007 02:56:50 +0200 + -- Finn-Arne Johansen Tue, 17 Apr 2007 11:22:16 +0200 slbackup-php (0.0.1) unstable; urgency=low 1.8 +1 -1 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- control 17 Apr 2007 01:02:56 -0000 1.7 +++ control 17 Apr 2007 09:24:37 -0000 1.8 @@ -16,5 +16,5 @@ - edit the configuration file - verify that last backup went ok - restore from backups - - remove old backups from the repository (not implemented) + - remove old backups from the repository - verify that ssh-keys are working (not implemented) From finnarne-guest at alioth.debian.org Tue Apr 17 09:24:37 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 09:24:39 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/17 09:24:37 Modified: src index.php Log: added maintenance (cleanup) of old backups Revision Changes Path 1.26 +76 -0 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- index.php 17 Apr 2007 06:15:26 -0000 1.25 +++ index.php 17 Apr 2007 09:24:37 -0000 1.26 @@ -19,6 +19,60 @@ */ +function removesnapshots ($passwd, $clientdir, $snapshot) { +global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; + + $cmd = sprintf ("ssh %s %s@%s 'rdiff-backup --force --remove-older-than %s %s'", + $ssh_options, $backupuser, + $backuphost, $snapshot, $clientdir) ; + + $snapshots = array () ; + $desc[0] = array ("pipe", "r") ; + $desc[1] = array ("pipe", "w") ; + $desc[2] = array ("file", "/tmp/error.log", "a") ; + + $env = array ('SSH_ASKPASS' => $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) { + $snapshots[] = $line ; + } + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + return $snapshots ; +} + +function listsnapshots ($passwd, $clientdir) { +global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; + + $cmd = sprintf ("ssh %s %s@%s 'find %s/rdiff-backup-data -maxdepth 1 -name \"increments.*\" -printf %s'", + $ssh_options, $backupuser, + $backuphost, $clientdir, '"%P\n"') ; + + $snapshots = array () ; + $desc[0] = array ("pipe", "r") ; + $desc[1] = array ("pipe", "w") ; + $desc[2] = array ("file", "/tmp/error.log", "a") ; + + $env = array ('SSH_ASKPASS' => $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) { + $snapshots[] = substr ($line, 11, 25) ; + } + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + return $snapshots ; +} + function fetchfile ($passwd, $clientdir, $location, $file) { global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; @@ -350,9 +404,16 @@ case "restoreclient": case "restorelocation": case "restorefile": + case "maint": + case "removesnapshot": case "logout": $submit=$key ; break ; + case "selected": + $selected=$value ; + case "snapshot": + $snapshot=$value ; + break ; case "client": $client=htmlspecialchars(trim($value)) ; break ; @@ -530,6 +591,14 @@ $newconf["location"], $newconf["sub"]) ; break ; + case "removesnapshot": + if (!empty ($snapshot) and ($selected == $client)) + $smarty->assign ('removed', removesnapshots ($passwd, sprintf ("%s/%s", $config["server_destdir"], $client), $snapshot)) ; + case "maint": + if (!empty($client)) { + $smarty->assign ('snapshots', listsnapshots ($passwd, sprintf ("%s/%s", $config["server_destdir"], $client))) ; + } + break ; default: $log = array ('start' => '', 'end' => '') ; foreach ($config["clients"] as $key => $value) @@ -553,6 +622,13 @@ $smarty->assign ('locations', $config["clients"][$client]["location"]) ; $smarty->display ('restore.tpl') ; break ; + case "removesnapshot": + case "maint": + $clients = array_keys($config["clients"]) ; + $smarty->assign ('clients', $clients) ; + $smarty->assign ('client', $client) ; + $smarty->display ('maint.tpl') ; + break ; case "config": case "addclient": case "server": From finnarne-guest at alioth.debian.org Tue Apr 17 09:24:37 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 09:24:39 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates header.tpl maint.tpl Message-ID: User: finnarne-guest Date: 07/04/17 09:24:37 Modified: templates header.tpl Added: templates maint.tpl Log: added maintenance (cleanup) of old backups Revision Changes Path 1.2 +1 -0 slbackup-php/templates/header.tpl Index: header.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/header.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- header.tpl 17 Apr 2007 06:18:58 -0000 1.1 +++ header.tpl 17 Apr 2007 09:24:37 -0000 1.2 @@ -31,6 +31,7 @@
      • {t}Status{/t}
      • {t}Config{/t}
      • {t}Restore{/t}
      • +
      • {t}Maintenance{/t}
      • {t}Logout{/t}
      1.1 slbackup-php/templates/maint.tpl Index: maint.tpl =================================================================== {* slbackup-php, an administration tool for slbackup Copyright (C) 2007 Finn-Arne Johansen , Bzzware AS, Norway This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} {include file="header.tpl"}

      {t}Maintenance{/t}

      {html_options name=client values=$clients output=$clients selected=$client} {if $client <> "" } {t}Oldest snapshot to keep:{/t} {html_options name=snapshot values=$snapshots output=$snapshots selected=$snapshot} {/if}
      {foreach item=removedss from=$removed} {$removedss}
      {/foreach}
      From pwinnertz-guest at alioth.debian.org Tue Apr 17 20:09:43 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Tue Apr 17 20:09:45 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog postinst prerm Message-ID: User: pwinnertz-guest Date: 07/04/17 20:09:43 Modified: debian changelog postinst Removed: debian prerm Log: Some minor changes to be policy compliant Revision Changes Path 1.14 +6 -1 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- changelog 17 Apr 2007 09:24:37 -0000 1.13 +++ changelog 17 Apr 2007 20:09:43 -0000 1.14 @@ -13,7 +13,12 @@ * Added restore of single-files * Added maintenance functionality (remove old backups) - -- Finn-Arne Johansen Tue, 17 Apr 2007 11:22:16 +0200 + [ Patrick Winnertz ] + * Removed prerm since we don't need it to a2dissite slbackup-php + * Removed some debconf stuff from postinst since we doesn't use it + at all + + -- Patrick Winnertz Tue, 17 Apr 2007 22:04:12 +0200 slbackup-php (0.0.1) unstable; urgency=low 1.3 +0 -6 slbackup-php/debian/postinst Index: postinst =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postinst,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- postinst 17 Apr 2007 04:44:05 -0000 1.2 +++ postinst 17 Apr 2007 20:09:43 -0000 1.3 @@ -2,16 +2,10 @@ set -e -. /usr/share/debconf/confmodule - -# should we do a2dissite when upgrading from 0.0.1?? - mkdir -p /var/spool/slbackup-php if [ -d /var/spool/slbackup-php ]; then chown www-data:www-data /var/spool/slbackup-php/ fi -db_stop - #DEBHELPER# From werner at alioth.debian.org Tue Apr 17 20:19:54 2007 From: werner at alioth.debian.org (werner@alioth.debian.org) Date: Tue Apr 17 20:19:56 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog control Message-ID: User: werner Date: 07/04/17 20:19:54 Modified: debian changelog control Log: added dependency on smarty-gettext Revision Changes Path 1.15 +2 -1 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- changelog 17 Apr 2007 20:09:43 -0000 1.14 +++ changelog 17 Apr 2007 20:19:54 -0000 1.15 @@ -1,4 +1,4 @@ -slbackup-php (0.0.2~1) UNRELEASED; urgency=low +slbackup-php (0.0.2) UNRELEASED; urgency=low [ Morten Werner Olsen ] * Added a test in debian/postrm to prevent it from failure. @@ -6,6 +6,7 @@ * Changed 'todo' in package description to 'not implemented'. * Polished the Apache config a bit. * Change from using sites-available/ to conf.d/ for Apache config. + * Added dependency on smarty-gettext. [ Finn-Arne Johansen ] * Added logout functionality 1.9 +1 -1 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- control 17 Apr 2007 09:24:37 -0000 1.8 +++ control 17 Apr 2007 20:19:54 -0000 1.9 @@ -8,7 +8,7 @@ Package: slbackup-php Architecture: all -Depends: debconf | debconf-2.0, libapache2-mod-php5, apache2, smarty, ssh +Depends: debconf | debconf-2.0, libapache2-mod-php5, apache2, smarty, smarty-gettext, ssh Description: A web-based administration tool for slbackup written in php Aims to provide the necesarry functions to maintain a slbackup-repository That means the ability to From werner at alioth.debian.org Tue Apr 17 20:34:46 2007 From: werner at alioth.debian.org (werner@alioth.debian.org) Date: Tue Apr 17 20:34:47 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: werner Date: 07/04/17 20:34:46 Modified: debian changelog Log: Revision Changes Path 1.16 +1 -0 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- changelog 17 Apr 2007 20:19:54 -0000 1.15 +++ changelog 17 Apr 2007 20:34:46 -0000 1.16 @@ -7,6 +7,7 @@ * Polished the Apache config a bit. * Change from using sites-available/ to conf.d/ for Apache config. * Added dependency on smarty-gettext. + * Changed apache.conf to only apply config when mod_ssl is loaded. [ Finn-Arne Johansen ] * Added logout functionality From werner at alioth.debian.org Tue Apr 17 20:34:46 2007 From: werner at alioth.debian.org (werner@alioth.debian.org) Date: Tue Apr 17 20:34:47 2007 Subject: [slbackup-commit] CVS update: slbackup-php/etc apache.conf Message-ID: User: werner Date: 07/04/17 20:34:46 Modified: etc apache.conf Log: Revision Changes Path 1.3 +10 -10 slbackup-php/etc/apache.conf Index: apache.conf =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/etc/apache.conf,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- apache.conf 16 Apr 2007 20:27:26 -0000 1.2 +++ apache.conf 17 Apr 2007 20:34:46 -0000 1.3 @@ -1,19 +1,19 @@ - - - RewriteEngine on - RewriteCond %{HTTPS} !^on$ [NC] - RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L] + + + RewriteEngine on + RewriteCond %{HTTPS} !^on$ [NC] + RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L] - - + -Alias /slbackup-php "/usr/share/slbackup-php/web" - + Alias /slbackup-php "/usr/share/slbackup-php/web" + DirectoryIndex index.php Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all - + + From finnarne-guest at alioth.debian.org Tue Apr 17 20:35:22 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 20:35:23 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian control Message-ID: User: finnarne-guest Date: 07/04/17 20:35:22 Modified: debian control Log: Depend on php5-cli, to prevent smarty-gettext to pull in php4-cli Revision Changes Path 1.10 +2 -2 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- control 17 Apr 2007 20:19:54 -0000 1.9 +++ control 17 Apr 2007 20:35:22 -0000 1.10 @@ -4,11 +4,11 @@ Maintainer: Finn-Arne Johansen Uploaders: Morten Werner Olsen Standards-Version: 3.7.2 -Build-Depends: debhelper (>= 5), po-debconf +Build-Depends: debhelper (>= 5), po-debconf, php5-cli Package: slbackup-php Architecture: all -Depends: debconf | debconf-2.0, libapache2-mod-php5, apache2, smarty, smarty-gettext, ssh +Depends: debconf | debconf-2.0, libapache2-mod-php5, apache2, smarty, ssh, php5-cli, smarty-gettext Description: A web-based administration tool for slbackup written in php Aims to provide the necesarry functions to maintain a slbackup-repository That means the ability to From pwinnertz-guest at alioth.debian.org Tue Apr 17 20:40:43 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Tue Apr 17 20:40:43 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog postinst Message-ID: User: pwinnertz-guest Date: 07/04/17 20:40:43 Modified: debian changelog postinst Log: Added mod_rewrite load to postinst Revision Changes Path 1.17 +1 -0 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- changelog 17 Apr 2007 20:34:46 -0000 1.16 +++ changelog 17 Apr 2007 20:40:43 -0000 1.17 @@ -19,6 +19,7 @@ * Removed prerm since we don't need it to a2dissite slbackup-php * Removed some debconf stuff from postinst since we doesn't use it at all + * Added some stuff to postinst to load the apache module mod_rewrite -- Patrick Winnertz Tue, 17 Apr 2007 22:04:12 +0200 1.4 +9 -0 slbackup-php/debian/postinst Index: postinst =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postinst,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- postinst 17 Apr 2007 20:09:43 -0000 1.3 +++ postinst 17 Apr 2007 20:40:43 -0000 1.4 @@ -2,6 +2,15 @@ set -e +if [ -x /usr/sbin/a2enmod ] && [ -L /etc/apache2/mods-enabled/ssl.conf ]; then + /usr/sbin/a2enmod rewrite > /dev/null + if [ -x /usr/sbin/invoke-rc.d ] ; then + /usr/sbin/invoke-rc.d apache2 force-reload || : + else + [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || : + fi +fi + mkdir -p /var/spool/slbackup-php if [ -d /var/spool/slbackup-php ]; then From finnarne-guest at alioth.debian.org Tue Apr 17 20:43:41 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 20:43:42 2007 Subject: [slbackup-commit] CVS update: slbackup-php/po nb_NO.po Message-ID: User: finnarne-guest Date: 07/04/17 20:43:41 Modified: po nb_NO.po Log: Updated norwegian translation Revision Changes Path 1.4 +7 -7 slbackup-php/po/nb_NO.po Index: nb_NO.po =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/nb_NO.po,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- nb_NO.po 17 Apr 2007 01:09:32 -0000 1.3 +++ nb_NO.po 17 Apr 2007 20:43:41 -0000 1.4 @@ -8,7 +8,7 @@ "Project-Id-Version: slbackup 0.0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-04-17 02:58+0200\n" -"PO-Revision-Date: 2007-04-17 03:05+0200\n" +"PO-Revision-Date: 2007-04-17 22:45+0200\n" "Last-Translator: Finn-Arne Johansen\n" "Language-Team: Norsk bokm??l\n" "MIME-Version: 1.0\n" @@ -31,12 +31,12 @@ #. templates/config.tpl #: standard input:8 msgid "Backup enabled" -msgstr "Kj??r backup" +msgstr "Sikkerhetskopiering aktivert" #. templates/config.tpl #: standard input:11 msgid "Run backup at" -msgstr "Kj??r backup klokken" +msgstr "Kj?? sikkerhetskopiering klokken" #. templates/config.tpl #: standard input:14 input:35 src/index.php:590 @@ -47,12 +47,12 @@ #. templates/login.tpl #: standard input:17 input:38 input:68 input:122 msgid "Reset" -msgstr "Nullstill" +msgstr "Tilbakestill" #. templates/config.tpl #: standard input:20 msgid "Server config" -msgstr "Konfigurasjon for server" +msgstr "Konfigurasjon for tjener" #. templates/config.tpl #: standard input:23 input:56 @@ -62,7 +62,7 @@ #. templates/config.tpl #: standard input:26 msgid "Destdir" -msgstr "Backup-katalog" +msgstr "M??lkatalog" #. templates/config.tpl #: standard input:29 @@ -190,7 +190,7 @@ #. templates/menu.tpl #: standard input:134 msgid "Logout" -msgstr "Log ut" +msgstr "Logg ut" #: src/index.php:451 #, php-format From finnarne-guest at alioth.debian.org Tue Apr 17 20:46:25 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Tue Apr 17 20:46:26 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates status.tpl Message-ID: User: finnarne-guest Date: 07/04/17 20:46:25 Modified: templates status.tpl Log: only report a backup in progress if it is actually started Revision Changes Path 1.4 +2 -2 slbackup-php/templates/status.tpl Index: status.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/status.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- status.tpl 17 Apr 2007 06:18:58 -0000 1.3 +++ status.tpl 17 Apr 2007 20:46:25 -0000 1.4 @@ -39,8 +39,8 @@

      {t}Backup status{/t}

      {t 1=$log.end|date_format:"%c"}Backup last finished at %1{/t}
      - {if $log.start > $values.end } - {t 1=$log.end|date_format:"%c"}A new backup started at %1{/t}
      + {if $log.start > $log.end } + {t 1=$log.start|date_format:"%c"}A new backup started at %1{/t}
      {/if} From pwinnertz-guest at alioth.debian.org Tue Apr 17 20:53:34 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Tue Apr 17 20:53:36 2007 Subject: [slbackup-commit] CVS update: slbackup-php/etc apache.conf Message-ID: User: pwinnertz-guest Date: 07/04/17 20:53:34 Modified: etc apache.conf Log: Make slbackup also accessable without ssl Revision Changes Path 1.4 +11 -11 slbackup-php/etc/apache.conf Index: apache.conf =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/etc/apache.conf,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- apache.conf 17 Apr 2007 20:34:46 -0000 1.3 +++ apache.conf 17 Apr 2007 20:53:34 -0000 1.4 @@ -1,19 +1,19 @@ - - + + RewriteEngine on RewriteCond %{HTTPS} !^on$ [NC] RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L] - - Alias /slbackup-php "/usr/share/slbackup-php/web" - - DirectoryIndex index.php - Options Indexes FollowSymLinks - AllowOverride None - Order allow,deny - Allow from all - +Alias /slbackup-php "/usr/share/slbackup-php/web" + + DirectoryIndex index.php + Options Indexes FollowSymLinks + AllowOverride None + Order allow,deny + Allow from all + + From finnarne-guest at alioth.debian.org Wed Apr 18 05:15:18 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 05:15:20 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/18 05:15:18 Modified: src index.php Log: Report if keys are working or if rdiff-backup versions differ Revision Changes Path 1.27 +53 -0 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- index.php 17 Apr 2007 09:24:37 -0000 1.26 +++ index.php 18 Apr 2007 05:15:18 -0000 1.27 @@ -19,6 +19,55 @@ */ +function checkkeysandversions ($passwd, $config) { +global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; + + $out = array () ; + $desc[0] = array ("pipe", "r") ; + $desc[1] = array ("pipe", "w") ; + $desc[2] = array ("file", "/tmp/error.log", "a") ; + + $env = array ('SSH_ASKPASS' => $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + + $cmd = sprintf ("ssh %s %s@%s 'rdiff-backup --version'", + $ssh_options, $backupuser, + $backuphost) ; + + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) { + $out["version"] = trim($line) ; + } + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + foreach ($config["clients"] as $key => $value) { + if ($key["type"] <> "local") { + $out["clients"][$key]["ssh"] = "failed" ; + $cmd = sprintf ("ssh %s %s@%s 'ssh %s echo ssh ok \; rdiff-backup --version'", + $ssh_options, $backupuser, + $backuphost, $value["address"]) ; + + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) { + list ($test, $result) = explode (" ", trim($line)) ; + $out["clients"][$key][$test] = $result ; + } + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + } + + } + return ($out) ; +} + function removesnapshots ($passwd, $clientdir, $snapshot) { global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; @@ -599,12 +648,16 @@ $smarty->assign ('snapshots', listsnapshots ($passwd, sprintf ("%s/%s", $config["server_destdir"], $client))) ; } break ; + case "config": + break ; default: $log = array ('start' => '', 'end' => '') ; foreach ($config["clients"] as $key => $value) $log["clients"][$key] = array ('start' => '', 'failed' => '', 'ok' => '') ; $log = readlog ($passwd, $log) ; + $smarty->assign ('checkkeysandversions', + checkkeysandversions ($passwd, $config)) ; break ; } From finnarne-guest at alioth.debian.org Wed Apr 18 05:15:18 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 05:15:20 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates status.tpl Message-ID: User: finnarne-guest Date: 07/04/18 05:15:18 Modified: templates status.tpl Log: Report if keys are working or if rdiff-backup versions differ Revision Changes Path 1.5 +12 -3 slbackup-php/templates/status.tpl Index: status.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/status.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- status.tpl 17 Apr 2007 20:46:25 -0000 1.4 +++ status.tpl 18 Apr 2007 05:15:18 -0000 1.5 @@ -27,11 +27,20 @@ Backup started as {$values.started|date_format:"%c"}, and is still in progress
      {/if} {if $values.ok > $values.failed } - OK at {$values.ok|date_format:"%c"} + {t 1=$values.ok|date_format:"%c"}OK at %1{/t} {elseif $values.failed <> ''} - Failed at {$values.ok|date_format:"%c"} + {t 1=$values.ok|date_format:"%c"}Failed at %1{/t} {elseif $values.started == ''} - Client never backed up + {t}Client never backed up{/t} + {/if} +
      + {if $checkkeysandversions.clients.$client.ssh == 'ok'} + {t}ssh-keys are working{/t}
      + {if $checkkeysandversions.clients.$client.rdiff-backup <> $checkkeysandversions.version} + {t}rdiff-backup-versions differ{/t} + {/if} + {else} + {t}ssh-keys are not working{/t} {/if} {/foreach} From finnarne-guest at alioth.debian.org Wed Apr 18 05:15:50 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 05:15:52 2007 Subject: [slbackup-commit] CVS update: slbackup-php/po nb_NO.po slbackup-php.pot Message-ID: User: finnarne-guest Date: 07/04/18 05:15:50 Modified: po nb_NO.po slbackup-php.pot Log: Updated tranlslation (template and nb_NO) Revision Changes Path 1.5 +106 -62 slbackup-php/po/nb_NO.po Index: nb_NO.po =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/nb_NO.po,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- nb_NO.po 17 Apr 2007 20:43:41 -0000 1.4 +++ nb_NO.po 18 Apr 2007 05:15:50 -0000 1.5 @@ -7,202 +7,246 @@ msgstr "" "Project-Id-Version: slbackup 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-17 02:58+0200\n" -"PO-Revision-Date: 2007-04-17 22:45+0200\n" +"POT-Creation-Date: 2007-04-18 07:07+0200\n" +"PO-Revision-Date: 2007-04-18 07:14+0200\n" "Last-Translator: Finn-Arne Johansen\n" "Language-Team: Norsk bokm??l\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +#. templates/maint.tpl +#. templates/header.tpl +#: standard input:2 input:26 +msgid "Maintenance" +msgstr "" + +#. templates/maint.tpl #. templates/config.tpl #. templates/restore.tpl -#. templates/status.tpl -#. templates/login.tpl -#: standard input:2 input:80 input:95 input:110 +#: standard input:5 input:74 input:110 +msgid "Choose" +msgstr "Velg" + +#. templates/maint.tpl +#: standard input:8 +msgid "Oldest snapshot to keep:" +msgstr "Eldste kopi som skal beholdes:" + +#. templates/maint.tpl +#: standard input:11 +msgid "Delete older" +msgstr "Slett eldre" + +#. templates/header.tpl +#: standard input:14 msgid "SLBackup Configuration" msgstr "SLBackup Konfigurasjon" +#. templates/header.tpl +#: standard input:17 +msgid "Status" +msgstr "Status" + +#. templates/header.tpl +#: standard input:20 +msgid "Config" +msgstr "Konfigurasjon" + +#. templates/header.tpl +#: standard input:23 +msgid "Restore" +msgstr "Gjennopprett" + +#. templates/header.tpl +#: standard input:29 +msgid "Logout" +msgstr "Logg ut" + #. templates/config.tpl -#: standard input:5 +#: standard input:32 msgid "Server scheduler" msgstr "Tidsplanlegging" #. templates/config.tpl -#: standard input:8 +#: standard input:35 msgid "Backup enabled" msgstr "Sikkerhetskopiering aktivert" #. templates/config.tpl -#: standard input:11 +#: standard input:38 msgid "Run backup at" msgstr "Kj?? sikkerhetskopiering klokken" #. templates/config.tpl -#: standard input:14 input:35 src/index.php:590 +#: standard input:41 input:62 src/index.php:721 msgid "Update" msgstr "Oppdater" #. templates/config.tpl #. templates/login.tpl -#: standard input:17 input:38 input:68 input:122 +#: standard input:44 input:65 input:95 input:158 msgid "Reset" msgstr "Tilbakestill" #. templates/config.tpl -#: standard input:20 +#: standard input:47 msgid "Server config" msgstr "Konfigurasjon for tjener" #. templates/config.tpl -#: standard input:23 input:56 +#: standard input:50 input:83 msgid "Address" msgstr "Adresse" #. templates/config.tpl -#: standard input:26 +#: standard input:53 msgid "Destdir" msgstr "M??lkatalog" #. templates/config.tpl -#: standard input:29 +#: standard input:56 msgid "Servertype" msgstr "Type" #. templates/config.tpl -#: standard input:32 input:65 +#: standard input:59 input:92 msgid "User" msgstr "Bruker" #. templates/config.tpl -#: standard input:41 +#: standard input:68 msgid "Client config" msgstr "Konfigurasjon av klienter" #. templates/config.tpl -#: standard input:44 +#: standard input:71 msgid "Client:" msgstr "Klient:" #. templates/config.tpl -#. templates/restore.tpl -#: standard input:47 input:86 -msgid "Choose" -msgstr "Velg" - -#. templates/config.tpl -#: standard input:50 +#: standard input:77 msgid "New" msgstr "Ny" #. templates/config.tpl -#: standard input:53 +#: standard input:80 msgid "Remove" msgstr "Slett" #. templates/config.tpl -#: standard input:59 +#: standard input:86 msgid "Backup Age" msgstr "Alder p?? backup" #. templates/config.tpl -#: standard input:62 +#: standard input:89 msgid "Clienttype" msgstr "Type" #. templates/config.tpl #. templates/restore.tpl -#: standard input:71 input:89 +#: standard input:98 input:113 msgid "Locations:" msgstr "Kataloger:" #. templates/config.tpl -#: standard input:74 src/index.php:588 +#: standard input:101 src/index.php:719 msgid "Add" msgstr "Legg til" #. templates/config.tpl -#: standard input:77 +#: standard input:104 msgid "Delete" msgstr "Slett" #. templates/restore.tpl -#: standard input:83 +#: standard input:107 msgid "Client to restore" msgstr "Klient som skal gjenskapes" #. templates/restore.tpl -#: standard input:92 +#: standard input:116 msgid "Browse" msgstr "Bla" #. templates/status.tpl -#: standard input:98 +#: standard input:119 msgid "Clients" msgstr "Klient" #. templates/status.tpl -#: standard input:101 +#: standard input:122 +msgid "OK at %1" +msgstr "OK %1" + +#. templates/status.tpl +#: standard input:125 +msgid "Failed at %1" +msgstr "Feiler %1" + +#. templates/status.tpl +#: standard input:128 +msgid "Client never backed up" +msgstr "Det er aldri tatt sikkerthetskopi av klienten" + +#. templates/status.tpl +#: standard input:131 +msgid "ssh-keys are working" +msgstr "sshn??kler er satt rett opp" + +#. templates/status.tpl +#: standard input:134 +msgid "rdiff-backup-versions differ" +msgstr "Det er forskjellig versjon av rdiff-backup" + +#. templates/status.tpl +#: standard input:137 +msgid "ssh-keys are not working" +msgstr "sshn??kler er ikke satt korrekt opp" + +#. templates/status.tpl +#: standard input:140 msgid "Backup status" msgstr "Status for Sikkerhetskopiering" #. templates/status.tpl -#: standard input:104 +#: standard input:143 msgid "Backup last finished at %1" msgstr "Sikkerhetskopiering ble fullf??rt %1" #. templates/status.tpl -#: standard input:107 +#: standard input:146 msgid "A new backup started at %1" msgstr "En ny sikkerhetskopieringsjobb ble startet %1" #. templates/login.tpl -#: standard input:113 +#: standard input:149 msgid "To read the configuration, you must log in as %1 on %2." msgstr "" "For ?? se p?? konfigurasjonen, m?? du logge inn som bruker %1 p?? maskinen %2" #. templates/login.tpl -#: standard input:116 +#: standard input:152 msgid "Please enter the password for the %1 account on %2:" msgstr "Legg inn passordet for bruker %1 p?? %2:" #. templates/login.tpl -#: standard input:119 +#: standard input:155 msgid "Login" msgstr "Logg inn" -#. templates/menu.tpl -#: standard input:125 -msgid "Status" -msgstr "Status" - -#. templates/menu.tpl -#: standard input:128 -msgid "Config" -msgstr "Konfigurasjon" - -#. templates/menu.tpl -#: standard input:131 -msgid "Restore" -msgstr "Gjennopprett" - -#. templates/menu.tpl -#: standard input:134 -msgid "Logout" -msgstr "Logg ut" - -#: src/index.php:451 +#: src/index.php:563 #, php-format msgid "No client specified :(" msgstr "Ingen klient ble valgt ?? slette" -#: src/index.php:456 +#: src/index.php:568 #, php-format msgid "Unable to find %s in the list of clients." msgstr "Fant ikke klienten %s i listen." -#: src/index.php:490 +#: src/index.php:602 #, php-format msgid "Unable to find %s in the locations of %s." msgstr "Finner ikke %s i listen av kataloger." 1.5 +105 -61 slbackup-php/po/slbackup-php.pot Index: slbackup-php.pot =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/slbackup-php.pot,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- slbackup-php.pot 17 Apr 2007 01:02:56 -0000 1.4 +++ slbackup-php.pot 18 Apr 2007 05:15:50 -0000 1.5 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-17 02:58+0200\n" +"POT-Creation-Date: 2007-04-18 07:07+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,193 +16,237 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" +#. templates/maint.tpl +#. templates/header.tpl +#: standard input:2 standard input:26 +msgid "Maintenance" +msgstr "" + +#. templates/maint.tpl #. templates/config.tpl #. templates/restore.tpl -#. templates/status.tpl -#. templates/login.tpl -#: standard input:2 standard input:80 standard input:95 standard input:110 +#: standard input:5 standard input:74 standard input:110 +msgid "Choose" +msgstr "" + +#. templates/maint.tpl +#: standard input:8 +msgid "Oldest snapshot to keep:" +msgstr "" + +#. templates/maint.tpl +#: standard input:11 +msgid "Delete older" +msgstr "" + +#. templates/header.tpl +#: standard input:14 msgid "SLBackup Configuration" msgstr "" +#. templates/header.tpl +#: standard input:17 +msgid "Status" +msgstr "" + +#. templates/header.tpl +#: standard input:20 +msgid "Config" +msgstr "" + +#. templates/header.tpl +#: standard input:23 +msgid "Restore" +msgstr "" + +#. templates/header.tpl +#: standard input:29 +msgid "Logout" +msgstr "" + #. templates/config.tpl -#: standard input:5 +#: standard input:32 msgid "Server scheduler" msgstr "" #. templates/config.tpl -#: standard input:8 +#: standard input:35 msgid "Backup enabled" msgstr "" #. templates/config.tpl -#: standard input:11 +#: standard input:38 msgid "Run backup at" msgstr "" #. templates/config.tpl -#: standard input:14 standard input:35 src/index.php:590 +#: standard input:41 standard input:62 src/index.php:721 msgid "Update" msgstr "" #. templates/config.tpl #. templates/login.tpl -#: standard input:17 standard input:38 standard input:68 standard input:122 +#: standard input:44 standard input:65 standard input:95 standard input:158 msgid "Reset" msgstr "" #. templates/config.tpl -#: standard input:20 +#: standard input:47 msgid "Server config" msgstr "" #. templates/config.tpl -#: standard input:23 standard input:56 +#: standard input:50 standard input:83 msgid "Address" msgstr "" #. templates/config.tpl -#: standard input:26 +#: standard input:53 msgid "Destdir" msgstr "" #. templates/config.tpl -#: standard input:29 +#: standard input:56 msgid "Servertype" msgstr "" #. templates/config.tpl -#: standard input:32 standard input:65 +#: standard input:59 standard input:92 msgid "User" msgstr "" #. templates/config.tpl -#: standard input:41 +#: standard input:68 msgid "Client config" msgstr "" #. templates/config.tpl -#: standard input:44 +#: standard input:71 msgid "Client:" msgstr "" #. templates/config.tpl -#. templates/restore.tpl -#: standard input:47 standard input:86 -msgid "Choose" -msgstr "" - -#. templates/config.tpl -#: standard input:50 +#: standard input:77 msgid "New" msgstr "" #. templates/config.tpl -#: standard input:53 +#: standard input:80 msgid "Remove" msgstr "" #. templates/config.tpl -#: standard input:59 +#: standard input:86 msgid "Backup Age" msgstr "" #. templates/config.tpl -#: standard input:62 +#: standard input:89 msgid "Clienttype" msgstr "" #. templates/config.tpl #. templates/restore.tpl -#: standard input:71 standard input:89 +#: standard input:98 standard input:113 msgid "Locations:" msgstr "" #. templates/config.tpl -#: standard input:74 src/index.php:588 +#: standard input:101 src/index.php:719 msgid "Add" msgstr "" #. templates/config.tpl -#: standard input:77 +#: standard input:104 msgid "Delete" msgstr "" #. templates/restore.tpl -#: standard input:83 +#: standard input:107 msgid "Client to restore" msgstr "" #. templates/restore.tpl -#: standard input:92 +#: standard input:116 msgid "Browse" msgstr "" #. templates/status.tpl -#: standard input:98 +#: standard input:119 msgid "Clients" msgstr "" #. templates/status.tpl -#: standard input:101 +#: standard input:122 +msgid "OK at %1" +msgstr "" + +#. templates/status.tpl +#: standard input:125 +msgid "Failed at %1" +msgstr "" + +#. templates/status.tpl +#: standard input:128 +msgid "Client never backed up" +msgstr "" + +#. templates/status.tpl +#: standard input:131 +msgid "ssh-keys are working" +msgstr "" + +#. templates/status.tpl +#: standard input:134 +msgid "rdiff-backup-versions differ" +msgstr "" + +#. templates/status.tpl +#: standard input:137 +msgid "ssh-keys are not working" +msgstr "" + +#. templates/status.tpl +#: standard input:140 msgid "Backup status" msgstr "" #. templates/status.tpl -#: standard input:104 +#: standard input:143 msgid "Backup last finished at %1" msgstr "" #. templates/status.tpl -#: standard input:107 +#: standard input:146 msgid "A new backup started at %1" msgstr "" #. templates/login.tpl -#: standard input:113 +#: standard input:149 msgid "To read the configuration, you must log in as %1 on %2." msgstr "" #. templates/login.tpl -#: standard input:116 +#: standard input:152 msgid "Please enter the password for the %1 account on %2:" msgstr "" #. templates/login.tpl -#: standard input:119 +#: standard input:155 msgid "Login" msgstr "" -#. templates/menu.tpl -#: standard input:125 -msgid "Status" -msgstr "" - -#. templates/menu.tpl -#: standard input:128 -msgid "Config" -msgstr "" - -#. templates/menu.tpl -#: standard input:131 -msgid "Restore" -msgstr "" - -#. templates/menu.tpl -#: standard input:134 -msgid "Logout" -msgstr "" - -#: src/index.php:451 +#: src/index.php:563 #, php-format msgid "No client specified :(" msgstr "" -#: src/index.php:456 +#: src/index.php:568 #, php-format msgid "Unable to find %s in the list of clients." msgstr "" -#: src/index.php:490 +#: src/index.php:602 #, php-format msgid "Unable to find %s in the locations of %s." msgstr "" From finnarne-guest at alioth.debian.org Wed Apr 18 05:24:51 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 05:24:53 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog control Message-ID: User: finnarne-guest Date: 07/04/18 05:24:51 Modified: debian changelog control Log: Now check of ssh-keys are working Updated changelog Revision Changes Path 1.18 +3 -2 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- changelog 17 Apr 2007 20:40:43 -0000 1.17 +++ changelog 18 Apr 2007 05:24:51 -0000 1.18 @@ -14,14 +14,15 @@ * Added a status-page * Added restore of single-files * Added maintenance functionality (remove old backups) + * Added localization (template and nb_NO) [ Patrick Winnertz ] * Removed prerm since we don't need it to a2dissite slbackup-php - * Removed some debconf stuff from postinst since we doesn't use it + * Removed some debconf stuff from postinst since we doesn't use it at all * Added some stuff to postinst to load the apache module mod_rewrite - -- Patrick Winnertz Tue, 17 Apr 2007 22:04:12 +0200 + -- Finn-Arne Johansen Wed, 18 Apr 2007 07:22:50 +0200 slbackup-php (0.0.1) unstable; urgency=low 1.11 +1 -1 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- control 17 Apr 2007 20:35:22 -0000 1.10 +++ control 18 Apr 2007 05:24:51 -0000 1.11 @@ -15,6 +15,6 @@ - schedule the execution of slbackup (through cron) - edit the configuration file - verify that last backup went ok + - verify that ssh-keys are working - restore from backups - remove old backups from the repository - - verify that ssh-keys are working (not implemented) From finnarne-guest at alioth.debian.org Wed Apr 18 05:58:55 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 05:58:56 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/18 05:58:55 Modified: src index.php Log: Warn if about to send password over unencrypted link Revision Changes Path 1.28 +2 -0 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- index.php 18 Apr 2007 05:15:18 -0000 1.27 +++ index.php 18 Apr 2007 05:58:55 -0000 1.28 @@ -483,6 +483,8 @@ $config = readconf ($passwd) ; if (empty ($config)) { + if (!empty ($_SERVER["HTTPS"])) + $smarty->assign ('https', 'true') ; $smarty->assign ('backupuser', $backupuser) ; $smarty->assign ('backuphost', $backuphost) ; $smarty->display ('login.tpl') ; From finnarne-guest at alioth.debian.org Wed Apr 18 05:58:55 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 05:58:56 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates login.tpl Message-ID: User: finnarne-guest Date: 07/04/18 05:58:55 Modified: templates login.tpl Log: Warn if about to send password over unencrypted link Revision Changes Path 1.5 +6 -0 slbackup-php/templates/login.tpl Index: login.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/login.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- login.tpl 17 Apr 2007 06:18:58 -0000 1.4 +++ login.tpl 18 Apr 2007 05:58:55 -0000 1.5 @@ -20,6 +20,12 @@
      {t 1=$backupuser 2=$backuphost}To read the configuration, you must log in as %1 on %2.{/t}
      {t 1=$backupuser 2=$backuphost}Please enter the password for the %1 account on %2:{/t}
      + {if $https == "" } + + {t}WARNING: you are about to send you password over an unencrypted link, please ask your administrator to enable https{/t} +
      +
      + {/if}
      From finnarne-guest at alioth.debian.org Wed Apr 18 06:01:16 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 06:01:17 2007 Subject: [slbackup-commit] CVS update: slbackup-php/po nb_NO.po slbackup-php.pot Message-ID: User: finnarne-guest Date: 07/04/18 06:01:16 Modified: po nb_NO.po slbackup-php.pot Log: updated translations Revision Changes Path 1.6 +16 -9 slbackup-php/po/nb_NO.po Index: nb_NO.po =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/nb_NO.po,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- nb_NO.po 18 Apr 2007 05:15:50 -0000 1.5 +++ nb_NO.po 18 Apr 2007 06:01:15 -0000 1.6 @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: slbackup 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-18 07:07+0200\n" -"PO-Revision-Date: 2007-04-18 07:14+0200\n" +"POT-Creation-Date: 2007-04-18 07:58+0200\n" +"PO-Revision-Date: 2007-04-18 08:00+0200\n" "Last-Translator: Finn-Arne Johansen\n" "Language-Team: Norsk bokm??l\n" "MIME-Version: 1.0\n" @@ -19,7 +19,7 @@ #. templates/header.tpl #: standard input:2 input:26 msgid "Maintenance" -msgstr "" +msgstr "Vedlikehold" #. templates/maint.tpl #. templates/config.tpl @@ -79,13 +79,13 @@ msgstr "Kj?? sikkerhetskopiering klokken" #. templates/config.tpl -#: standard input:41 input:62 src/index.php:721 +#: standard input:41 input:62 src/index.php:723 msgid "Update" msgstr "Oppdater" #. templates/config.tpl #. templates/login.tpl -#: standard input:44 input:65 input:95 input:158 +#: standard input:44 input:65 input:95 input:161 msgid "Reset" msgstr "Tilbakestill" @@ -151,7 +151,7 @@ msgstr "Kataloger:" #. templates/config.tpl -#: standard input:101 src/index.php:719 +#: standard input:101 src/index.php:721 msgid "Add" msgstr "Legg til" @@ -233,20 +233,27 @@ #. templates/login.tpl #: standard input:155 +msgid "" +"WARNING: you are about to send you password over an unencrypted link, please " +"ask your administrator to enable https" +msgstr "" +"ADVARSEL: Denne fobindelsen er ikke kryptert, og passordet vil kunne leses i klartekst om noen lytter p?? linjen. Be administratoren om ?? aktivere https for denne applikasjonen" +#. templates/login.tpl +#: standard input:158 msgid "Login" msgstr "Logg inn" -#: src/index.php:563 +#: src/index.php:565 #, php-format msgid "No client specified :(" msgstr "Ingen klient ble valgt ?? slette" -#: src/index.php:568 +#: src/index.php:570 #, php-format msgid "Unable to find %s in the list of clients." msgstr "Fant ikke klienten %s i listen." -#: src/index.php:602 +#: src/index.php:604 #, php-format msgid "Unable to find %s in the locations of %s." msgstr "Finner ikke %s i listen av kataloger." 1.6 +14 -7 slbackup-php/po/slbackup-php.pot Index: slbackup-php.pot =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/slbackup-php.pot,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- slbackup-php.pot 18 Apr 2007 05:15:50 -0000 1.5 +++ slbackup-php.pot 18 Apr 2007 06:01:15 -0000 1.6 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-18 07:07+0200\n" +"POT-Creation-Date: 2007-04-18 07:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -80,13 +80,13 @@ msgstr "" #. templates/config.tpl -#: standard input:41 standard input:62 src/index.php:721 +#: standard input:41 standard input:62 src/index.php:723 msgid "Update" msgstr "" #. templates/config.tpl #. templates/login.tpl -#: standard input:44 standard input:65 standard input:95 standard input:158 +#: standard input:44 standard input:65 standard input:95 standard input:161 msgid "Reset" msgstr "" @@ -152,7 +152,7 @@ msgstr "" #. templates/config.tpl -#: standard input:101 src/index.php:719 +#: standard input:101 src/index.php:721 msgid "Add" msgstr "" @@ -233,20 +233,27 @@ #. templates/login.tpl #: standard input:155 +msgid "" +"WARNING: you are about to send you password over an unencrypted link, please " +"ask your administrator to enable https" +msgstr "" + +#. templates/login.tpl +#: standard input:158 msgid "Login" msgstr "" -#: src/index.php:563 +#: src/index.php:565 #, php-format msgid "No client specified :(" msgstr "" -#: src/index.php:568 +#: src/index.php:570 #, php-format msgid "Unable to find %s in the list of clients." msgstr "" -#: src/index.php:602 +#: src/index.php:604 #, php-format msgid "Unable to find %s in the locations of %s." msgstr "" From finnarne-guest at alioth.debian.org Wed Apr 18 06:30:41 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 06:30:43 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src functions.php index.php Message-ID: User: finnarne-guest Date: 07/04/18 06:30:41 Modified: src functions.php index.php Log: make the use possibility of using the application without https an option Revision Changes Path 1.6 +12 -1 slbackup-php/src/functions.php Index: functions.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/functions.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- functions.php 14 Apr 2007 05:19:34 -0000 1.5 +++ functions.php 18 Apr 2007 06:30:41 -0000 1.6 @@ -20,10 +20,11 @@ function loadConfig () { global $backuphost, $backupuser, $backupconf, $backupcron, - $ssh_options, $logfile, $smarty_templ, $smarty_compile ; + $ssh_options, $logfile, $nonhttps, $smarty_templ, $smarty_compile ; @include_once ("/etc/slbackup/config.php") ; + if (empty ($nonhttps)) $nonhttps = $_COOKIE ['nonhttps'] ; if (empty ($smarty_templ)) $smarty_templ = $_COOKIE ['smarty_templ'] ; if (empty ($smarty_compile)) $smarty_compile = $_COOKIE ['smarty_compile'] ; @@ -34,6 +35,16 @@ if (empty ($ssh_options)) $ssh_options="-o StrictHostKeyChecking=no" ; if (empty ($logfile)) $logfile="/var/log/slbackup/slbackup.log" ; + switch ($nonhttps) { + case "warn": + case "allow": + case "deny": + break ; + default: + $nonhttps = "warn" + setcookie ('nonhttps', $nonhttps) ; + break ; + } if (empty ($smarty_templ)) { $smarty_templ = realpath ("../templates") ; 1.29 +2 -2 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- index.php 18 Apr 2007 05:58:55 -0000 1.28 +++ index.php 18 Apr 2007 06:30:41 -0000 1.29 @@ -483,8 +483,8 @@ $config = readconf ($passwd) ; if (empty ($config)) { - if (!empty ($_SERVER["HTTPS"])) - $smarty->assign ('https', 'true') ; + if (empty ($_SERVER["HTTPS"])) + $smarty->assign ('https', $nonhttps) ; $smarty->assign ('backupuser', $backupuser) ; $smarty->assign ('backuphost', $backuphost) ; $smarty->display ('login.tpl') ; From finnarne-guest at alioth.debian.org Wed Apr 18 06:30:41 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 06:30:43 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates login.tpl Message-ID: User: finnarne-guest Date: 07/04/18 06:30:41 Modified: templates login.tpl Log: make the use possibility of using the application without https an option Revision Changes Path 1.6 +11 -4 slbackup-php/templates/login.tpl Index: login.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/login.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- login.tpl 18 Apr 2007 05:58:55 -0000 1.5 +++ login.tpl 18 Apr 2007 06:30:41 -0000 1.6 @@ -20,14 +20,21 @@ {t 1=$backupuser 2=$backuphost}To read the configuration, you must log in as %1 on %2.{/t}
      {t 1=$backupuser 2=$backuphost}Please enter the password for the %1 account on %2:{/t}
      - {if $https == "" } + {if $nonhttps == "warn" } {t}WARNING: you are about to send you password over an unencrypted link, please ask your administrator to enable https{/t}
      {/if} -
      - - + {if $nonhttps == "deny" } + + {t}Login to this application is denied without the use of https. Please ask your administrator to enable https{/t} +
      +
      + {else} +
      + + + {/if} From finnarne-guest at alioth.debian.org Wed Apr 18 06:36:44 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 06:36:46 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src functions.php index.php Message-ID: User: finnarne-guest Date: 07/04/18 06:36:44 Modified: src functions.php index.php Log: Make denial the default if running without https Revision Changes Path 1.7 +1 -1 slbackup-php/src/functions.php Index: functions.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/functions.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- functions.php 18 Apr 2007 06:30:41 -0000 1.6 +++ functions.php 18 Apr 2007 06:36:44 -0000 1.7 @@ -41,7 +41,7 @@ case "deny": break ; default: - $nonhttps = "warn" + $nonhttps = "deny" ; setcookie ('nonhttps', $nonhttps) ; break ; } 1.30 +3 -2 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- index.php 18 Apr 2007 06:30:41 -0000 1.29 +++ index.php 18 Apr 2007 06:36:44 -0000 1.30 @@ -483,8 +483,9 @@ $config = readconf ($passwd) ; if (empty ($config)) { - if (empty ($_SERVER["HTTPS"])) - $smarty->assign ('https', $nonhttps) ; + if (empty ($_SERVER["HTTPS"])) { + $smarty->assign ('nonhttps', $nonhttps) ; + } $smarty->assign ('backupuser', $backupuser) ; $smarty->assign ('backuphost', $backuphost) ; $smarty->display ('login.tpl') ; From finnarne-guest at alioth.debian.org Wed Apr 18 06:50:38 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 06:50:42 2007 Subject: [slbackup-commit] CVS update: slbackup-php ChangeLog Message-ID: User: finnarne-guest Date: 07/04/18 06:50:38 Added: . ChangeLog Log: CHanged this into a non-debian package, to make it easier for the upstream author Revision Changes Path 1.1 slbackup-php/ChangeLog Index: ChangeLog =================================================================== Wed, 18 Apr 2007 Finn-Arne Johansen * Release 0.1 * Changed into a non-debian package * Added logout functionality * Added a status-page * Added restore of single-files * Added maintenance functionality (remove old backups) * Added localization (template and nb_NO) * Polished the debian-package stuff (mainly done by Morten Werner Olsen and Patrick Winnerts) Fri, 13 Apr 2007 Finn-Arne Johansen * Release 0.0.1 * First version reelased in public Copyright 2007 by Finn-Arne Johansen, BzzWare AS, Norway See the accompanying file "COPYRIGHT" for details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. From finnarne-guest at alioth.debian.org Wed Apr 18 06:50:38 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 06:50:42 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog rules Message-ID: User: finnarne-guest Date: 07/04/18 06:50:38 Modified: debian changelog rules Log: CHanged this into a non-debian package, to make it easier for the upstream author Revision Changes Path 1.19 +3 -27 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- changelog 18 Apr 2007 05:24:51 -0000 1.18 +++ changelog 18 Apr 2007 06:50:38 -0000 1.19 @@ -1,31 +1,7 @@ -slbackup-php (0.0.2) UNRELEASED; urgency=low - - [ Morten Werner Olsen ] - * Added a test in debian/postrm to prevent it from failure. - * Added myself as uploader. - * Changed 'todo' in package description to 'not implemented'. - * Polished the Apache config a bit. - * Change from using sites-available/ to conf.d/ for Apache config. - * Added dependency on smarty-gettext. - * Changed apache.conf to only apply config when mod_ssl is loaded. +slbackup-php (0.1-0) experimental; urgency=low [ Finn-Arne Johansen ] - * Added logout functionality - * Added a status-page - * Added restore of single-files - * Added maintenance functionality (remove old backups) - * Added localization (template and nb_NO) - - [ Patrick Winnertz ] - * Removed prerm since we don't need it to a2dissite slbackup-php - * Removed some debconf stuff from postinst since we doesn't use it - at all - * Added some stuff to postinst to load the apache module mod_rewrite - - -- Finn-Arne Johansen Wed, 18 Apr 2007 07:22:50 +0200 - -slbackup-php (0.0.1) unstable; urgency=low + * First version ready for debian - * Initial upload + -- Finn-Arne Johansen Wed, 18 Apr 2007 08:46:57 +0200 - -- Finn-Arne Johansen Fri, 13 Apr 2007 15:52:51 +0200 1.5 +2 -2 slbackup-php/debian/rules Index: rules =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/rules,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- rules 13 Apr 2007 13:45:17 -0000 1.4 +++ rules 18 Apr 2007 06:50:38 -0000 1.5 @@ -32,8 +32,8 @@ dh_testdir dh_testroot dh_installchangelogs - #dh_installdocs ./ChangeLog - dh_installdocs + dh_installdocs ./ChangeLog + #dh_installdocs #mv $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/ChangeLog $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/changelog dh_installcron dh_installdebconf From finnarne-guest at alioth.debian.org Wed Apr 18 07:10:24 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 07:10:25 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian control Message-ID: User: finnarne-guest Date: 07/04/18 07:10:24 Modified: debian Tag: debian_branch_0_1 control Log: I dont want to be the debian-maintainer for this (either) Revision Changes Path No revision No revision 1.11.2.1 +2 -2 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -r1.11 -r1.11.2.1 --- control 18 Apr 2007 05:24:51 -0000 1.11 +++ control 18 Apr 2007 07:10:23 -0000 1.11.2.1 @@ -1,8 +1,8 @@ Source: slbackup-php Section: misc Priority: optional -Maintainer: Finn-Arne Johansen -Uploaders: Morten Werner Olsen +Maintainer: Patrick Winnertz +Uploaders: Morten Werner Olsen , Finn-Arne Johansen Standards-Version: 3.7.2 Build-Depends: debhelper (>= 5), po-debconf, php5-cli From finnarne-guest at alioth.debian.org Wed Apr 18 07:13:50 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 07:13:51 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: finnarne-guest Date: 07/04/18 07:13:50 Modified: debian Tag: debian_branch_0_1 changelog Log: Added bugnumber for initial upload Revision Changes Path No revision No revision 1.19.2.1 +2 -2 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -u -r1.19 -r1.19.2.1 --- changelog 18 Apr 2007 06:50:38 -0000 1.19 +++ changelog 18 Apr 2007 07:13:50 -0000 1.19.2.1 @@ -1,7 +1,7 @@ slbackup-php (0.1-0) experimental; urgency=low [ Finn-Arne Johansen ] - * First version ready for debian + * Initial upload (Closes: 419839) - -- Finn-Arne Johansen Wed, 18 Apr 2007 08:46:57 +0200 + -- Finn-Arne Johansen Wed, 18 Apr 2007 09:12:45 +0200 From finnarne-guest at alioth.debian.org Wed Apr 18 10:59:01 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 10:59:02 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src sl-style.css Message-ID: User: finnarne-guest Date: 07/04/18 10:59:01 Modified: src sl-style.css Log: Dont display things 'behind' the menu Revision Changes Path 1.2 +5 -0 slbackup-php/src/sl-style.css Index: sl-style.css =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/sl-style.css,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sl-style.css 17 Apr 2007 06:15:26 -0000 1.1 +++ sl-style.css 18 Apr 2007 10:59:01 -0000 1.2 @@ -53,6 +53,11 @@ top: 1em; right: 1em; bottom: auto; left: auto; } +div.form { + margin-top: 1ex; + margin-right: 30ex; + } + a:link { font-weight: bold; } From finnarne-guest at alioth.debian.org Wed Apr 18 10:59:01 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 10:59:03 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates login.tpl Message-ID: User: finnarne-guest Date: 07/04/18 10:59:01 Modified: templates login.tpl Log: Dont display things 'behind' the menu Revision Changes Path 1.7 +3 -0 slbackup-php/templates/login.tpl Index: login.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/login.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- login.tpl 18 Apr 2007 06:30:41 -0000 1.6 +++ login.tpl 18 Apr 2007 10:59:01 -0000 1.7 @@ -17,6 +17,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *} {include file="header.tpl"} + +
      {t 1=$backupuser 2=$backuphost}To read the configuration, you must log in as %1 on %2.{/t}
      {t 1=$backupuser 2=$backuphost}Please enter the password for the %1 account on %2:{/t}
      @@ -37,4 +39,5 @@ {/if}
      +
      From finnarne-guest at alioth.debian.org Wed Apr 18 12:00:29 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 12:00:31 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/18 12:00:29 Modified: src index.php Log: Display where in the subtree we are viewing Revision Changes Path 1.31 +1 -0 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- index.php 18 Apr 2007 06:36:44 -0000 1.30 +++ index.php 18 Apr 2007 12:00:29 -0000 1.31 @@ -668,6 +668,7 @@ case "restorelocation": $smarty->assign ('loc', $loc) ; $smarty->assign ('location', $newconf["location"]) ; + $smarty->assign ('sub', $newconf["sub"]) ; case "restoreclient": case "restore": $clients = array_keys($config["clients"]) ; From finnarne-guest at alioth.debian.org Wed Apr 18 12:00:29 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 12:00:31 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates restore.tpl Message-ID: User: finnarne-guest Date: 07/04/18 12:00:29 Modified: templates restore.tpl Log: Display where in the subtree we are viewing Revision Changes Path 1.7 +3 -0 slbackup-php/templates/restore.tpl Index: restore.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/restore.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- restore.tpl 17 Apr 2007 06:18:58 -0000 1.6 +++ restore.tpl 18 Apr 2007 12:00:29 -0000 1.7 @@ -28,6 +28,9 @@ selected=$location}
      + {if $sub <> "" } +

      {t 1=$sub}Restore of %1{/t}

      + {/if} {foreach item=dir name=dir from=$loc} {if $dir.type == "parent"} [DIR] From pwinnertz-guest at alioth.debian.org Wed Apr 18 15:26:21 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Wed Apr 18 15:26:23 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: pwinnertz-guest Date: 07/04/18 15:26:21 Modified: debian Tag: debian_branch_0_1 changelog Log: Added myself as maintainer Revision Changes Path No revision No revision 1.19.2.2 +6 -0 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.19.2.1 retrieving revision 1.19.2.2 diff -u -r1.19.2.1 -r1.19.2.2 --- changelog 18 Apr 2007 07:13:50 -0000 1.19.2.1 +++ changelog 18 Apr 2007 15:26:21 -0000 1.19.2.2 @@ -1,3 +1,9 @@ +slbackup-php (0.1-1) unstable; urgency=low + + * Added myself as maintainer and added Finnarne as uploader + + -- Patrick Winnertz Wed, 18 Apr 2007 17:25:45 +0200 + slbackup-php (0.1-0) experimental; urgency=low [ Finn-Arne Johansen ] From finnarne-guest at alioth.debian.org Wed Apr 18 19:04:56 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 18 19:04:58 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: finnarne-guest Date: 07/04/18 19:04:56 Modified: debian Tag: debian_branch_0_1 changelog Log: This is the first upload into debian Revision Changes Path No revision No revision 1.19.2.3 +1 -8 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.19.2.2 retrieving revision 1.19.2.3 diff -u -r1.19.2.2 -r1.19.2.3 --- changelog 18 Apr 2007 15:26:21 -0000 1.19.2.2 +++ changelog 18 Apr 2007 19:04:56 -0000 1.19.2.3 @@ -1,13 +1,6 @@ slbackup-php (0.1-1) unstable; urgency=low - * Added myself as maintainer and added Finnarne as uploader - - -- Patrick Winnertz Wed, 18 Apr 2007 17:25:45 +0200 - -slbackup-php (0.1-0) experimental; urgency=low - - [ Finn-Arne Johansen ] * Initial upload (Closes: 419839) - -- Finn-Arne Johansen Wed, 18 Apr 2007 09:12:45 +0200 + -- Patrick Winnertz Wed, 18 Apr 2007 17:25:45 +0200 From pwinnertz-guest at alioth.debian.org Wed Apr 18 20:07:14 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Wed Apr 18 20:07:16 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian/po - New directory Message-ID: User: pwinnertz-guest Date: 07/04/18 20:07:14 slbackup-php/debian/po - New directory From pwinnertz-guest at alioth.debian.org Wed Apr 18 20:11:04 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Wed Apr 18 20:11:04 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian config postinst rules templates Message-ID: User: pwinnertz-guest Date: 07/04/18 20:11:04 Modified: debian Tag: debian_branch_0_1 postinst rules Added: debian Tag: debian_branch_0_1 config templates Log: Added debconf things Revision Changes Path No revision No revision 1.4.2.1 +15 -7 slbackup-php/debian/postinst Index: postinst =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postinst,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- postinst 17 Apr 2007 20:40:43 -0000 1.4 +++ postinst 18 Apr 2007 20:11:04 -0000 1.4.2.1 @@ -2,13 +2,19 @@ set -e -if [ -x /usr/sbin/a2enmod ] && [ -L /etc/apache2/mods-enabled/ssl.conf ]; then - /usr/sbin/a2enmod rewrite > /dev/null - if [ -x /usr/sbin/invoke-rc.d ] ; then - /usr/sbin/invoke-rc.d apache2 force-reload || : - else - [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || : - fi +. /usr/share/debconf/confmodule + +db_get lwat/templates || true + +if [ $RET ]; then + if [ -x /usr/sbin/a2enmod ] && [ -L /etc/apache2/mods-enabled/ssl.conf ]; then + /usr/sbin/a2enmod rewrite > /dev/null + if [ -x /usr/sbin/invoke-rc.d ] ; then + /usr/sbin/invoke-rc.d apache2 force-reload || : + else + [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || : + fi + fi fi mkdir -p /var/spool/slbackup-php @@ -17,4 +23,6 @@ chown www-data:www-data /var/spool/slbackup-php/ fi +db_stop + #DEBHELPER# 1.5.2.1 +1 -1 slbackup-php/debian/rules Index: rules =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/rules,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -r1.5 -r1.5.2.1 --- rules 18 Apr 2007 06:50:38 -0000 1.5 +++ rules 18 Apr 2007 20:11:04 -0000 1.5.2.1 @@ -15,7 +15,7 @@ rm -f build-stamp -$(MAKE) clean dh_clean - #debconf-updatepo + debconf-updatepo install: build dh_testdir No revision No revision 1.1.2.1 +9 -0 slbackup-php/debian/Attic/config 1.1.2.1 +10 -0 slbackup-php/debian/Attic/templates From pwinnertz-guest at alioth.debian.org Wed Apr 18 20:11:04 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Wed Apr 18 20:11:06 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian/po POTFILES.in templates.pot Message-ID: User: pwinnertz-guest Date: 07/04/18 20:11:04 Added: debian/po Tag: debian_branch_0_1 POTFILES.in templates.pot Log: Added debconf things Revision Changes Path No revision No revision 1.1.2.1 +1 -0 slbackup-php/debian/po/Attic/POTFILES.in 1.1.2.1 +39 -0 slbackup-php/debian/po/Attic/templates.pot From pwinnertz-guest at alioth.debian.org Wed Apr 18 20:15:50 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Wed Apr 18 20:15:51 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian config Message-ID: User: pwinnertz-guest Date: 07/04/18 20:15:50 Modified: debian Tag: debian_branch_0_1 config Log: Copy & Paste sucks Revision Changes Path No revision No revision 1.1.2.2 +1 -1 slbackup-php/debian/Attic/config Index: config =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/Attic/config,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- config 18 Apr 2007 20:11:04 -0000 1.1.2.1 +++ config 18 Apr 2007 20:15:50 -0000 1.1.2.2 @@ -4,6 +4,6 @@ . /usr/share/debconf/confmodule -db_input high lwat/domain || true +db_input high slbackup-php/use-ssl || true db_go From pwinnertz-guest at alioth.debian.org Wed Apr 18 20:23:00 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Wed Apr 18 20:23:01 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian postinst Message-ID: User: pwinnertz-guest Date: 07/04/18 20:23:00 Modified: debian Tag: debian_branch_0_1 postinst Log: Some more copy&paste errors + remove unneeded checks Revision Changes Path No revision No revision 1.4.2.2 +2 -2 slbackup-php/debian/postinst Index: postinst =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postinst,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -u -r1.4.2.1 -r1.4.2.2 --- postinst 18 Apr 2007 20:11:04 -0000 1.4.2.1 +++ postinst 18 Apr 2007 20:23:00 -0000 1.4.2.2 @@ -4,10 +4,10 @@ . /usr/share/debconf/confmodule -db_get lwat/templates || true +db_get slbackup-php/use-ssl || true if [ $RET ]; then - if [ -x /usr/sbin/a2enmod ] && [ -L /etc/apache2/mods-enabled/ssl.conf ]; then + if [ -x /usr/sbin/a2enmod ]; then /usr/sbin/a2enmod rewrite > /dev/null if [ -x /usr/sbin/invoke-rc.d ] ; then /usr/sbin/invoke-rc.d apache2 force-reload || : From pwinnertz-guest at alioth.debian.org Wed Apr 18 20:32:22 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Wed Apr 18 20:32:23 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian rules Message-ID: User: pwinnertz-guest Date: 07/04/18 20:32:22 Modified: debian Tag: debian_branch_0_1 rules Log: Fix some lintian warnings Revision Changes Path No revision No revision 1.5.2.2 +1 -1 slbackup-php/debian/rules Index: rules =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/rules,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -r1.5.2.1 -r1.5.2.2 --- rules 18 Apr 2007 20:11:04 -0000 1.5.2.1 +++ rules 18 Apr 2007 20:32:22 -0000 1.5.2.2 @@ -34,7 +34,7 @@ dh_installchangelogs dh_installdocs ./ChangeLog #dh_installdocs - #mv $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/ChangeLog $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/changelog + mv $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/ChangeLog $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/changelog dh_installcron dh_installdebconf dh_installman From pwinnertz-guest at alioth.debian.org Wed Apr 18 20:37:59 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Wed Apr 18 20:38:01 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian postinst Message-ID: User: pwinnertz-guest Date: 07/04/18 20:37:59 Modified: debian Tag: debian_branch_0_1 postinst Log: fixed some typos Revision Changes Path No revision No revision 1.4.2.3 +1 -1 slbackup-php/debian/postinst Index: postinst =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postinst,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -u -r1.4.2.2 -r1.4.2.3 --- postinst 18 Apr 2007 20:23:00 -0000 1.4.2.2 +++ postinst 18 Apr 2007 20:37:59 -0000 1.4.2.3 @@ -6,7 +6,7 @@ db_get slbackup-php/use-ssl || true -if [ $RET ]; then +if [ "$RET" eq "true" ]; then if [ -x /usr/sbin/a2enmod ]; then /usr/sbin/a2enmod rewrite > /dev/null if [ -x /usr/sbin/invoke-rc.d ] ; then From pwinnertz-guest at alioth.debian.org Wed Apr 18 20:40:11 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Wed Apr 18 20:40:13 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian postinst Message-ID: User: pwinnertz-guest Date: 07/04/18 20:40:11 Modified: debian Tag: debian_branch_0_1 postinst Log: It's too late, true is not a binary operator Revision Changes Path No revision No revision 1.4.2.4 +1 -1 slbackup-php/debian/postinst Index: postinst =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postinst,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.4 diff -u -r1.4.2.3 -r1.4.2.4 --- postinst 18 Apr 2007 20:37:59 -0000 1.4.2.3 +++ postinst 18 Apr 2007 20:40:11 -0000 1.4.2.4 @@ -6,7 +6,7 @@ db_get slbackup-php/use-ssl || true -if [ "$RET" eq "true" ]; then +if [ "$RET" == "true" ]; then if [ -x /usr/sbin/a2enmod ]; then /usr/sbin/a2enmod rewrite > /dev/null if [ -x /usr/sbin/invoke-rc.d ] ; then From finnarne-guest at alioth.debian.org Fri Apr 20 06:24:49 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 20 06:24:51 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/20 06:24:49 Modified: src index.php Log: Now it's possible to browse through deleted folders, and at list show, but not recover, deleted files Revision Changes Path 1.32 +56 -8 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- index.php 18 Apr 2007 12:00:29 -0000 1.31 +++ index.php 20 Apr 2007 06:24:48 -0000 1.32 @@ -159,9 +159,6 @@ 'sub' => trim ($parent)) ; } - $cmd = sprintf ("ssh %s %s@%s 'find %s%s/%s -maxdepth 1 -mindepth 1 -type d'", - $ssh_options, $backupuser, - $backuphost, $clientdir, $location, $sub ) ; $desc[0] = array ("pipe", "r") ; $desc[1] = array ("pipe", "w") ; @@ -169,6 +166,9 @@ $env = array ('SSH_ASKPASS' => $ssh_askpass, 'DISPLAY' => ':nowhere') ; + $cmd = sprintf ("ssh %s %s@%s 'find %s%s/%s -maxdepth 1 -mindepth 1 -type d'", + $ssh_options, $backupuser, + $backuphost, $clientdir, $location, $sub ) ; $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; if (is_resource ($proc)) { fprintf ($pipes[0], "%s\n", $passwd) ; @@ -182,6 +182,29 @@ fclose ($pipes[1]) ; proc_close ($proc) ; } + $cmd = sprintf ("ssh %s %s@%s 'find %s/rdiff-backup-data/increments%s/%s -maxdepth 1 -mindepth 1 -type d'", + $ssh_options, $backupuser, + $backuphost, $clientdir, $location, $sub ) ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) { + $found=false ; + foreach ($loc as $key => $value) + if ($value["type"] == "dir" and + $value["name"] == basename(trim ($line))) + $found = true ; + + if (!$found) + $loc[] = array ('type' => 'deldir', + 'name' => basename (trim($line)), + 'sub' => substr (trim ($line), strlen ($clientdir) + strlen ($location) + 30)) ; + + } + fclose ($pipes[1]) ; + proc_close ($proc) ; + } $cmd = sprintf ("ssh %s %s@%s 'find %s%s/%s -maxdepth 1 -mindepth 1 -type f'", $ssh_options, $backupuser, $backuphost, $clientdir, $location, $sub ) ; @@ -190,11 +213,36 @@ if (is_resource ($proc)) { fprintf ($pipes[0], "%s\n", $passwd) ; fclose ($pipes[0]) ; - while ($line = fgets ($pipes[1], 1024)) + while ($line = fgets ($pipes[1], 1024)) { + $base = basename (trim($line)) ; $loc[] = array ('type' => 'file', - 'name' => basename (trim($line)), - 'sub' => substr (trim ($line), strlen ($clientdir) + strlen ($location) + 1)) ; - + 'name' => $base, + 'sub' => sprintf ("%s/%s", $sub, $base)) ; + } + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + $cmd = sprintf ("ssh %s %s@%s 'find %s/rdiff-backup-data/increments%s/%s -maxdepth 1 -mindepth 1 -type f -name \"*.snapshot.gz\"'", + $ssh_options, $backupuser, + $backuphost, $clientdir, $location, $sub ) ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) { + $found=false ; + $base = basename (trim($line)) ; + $base = substr($base, 0, strlen($base) - 38) ; + foreach ($loc as $key => $value) + if ($value["type"] == "file" and + $value["name"] == $base) + $found = true ; + + if (!$found) + $loc[] = array ('type' => 'delfile', + 'name' => $base, + 'sub' => sprintf ("%s/%s", $sub, $base)) ; + } fclose ($pipes[1]) ; proc_close ($proc) ; } @@ -637,7 +685,7 @@ $loc = listloc ($passwd, sprintf ("%s/%s", $config["server_destdir"], $client), $newconf["location"]) ; - else + else $loc = listloc ($passwd, sprintf ("%s/%s", $config["server_destdir"], $client), $newconf["location"], $newconf["sub"]) ; From finnarne-guest at alioth.debian.org Fri Apr 20 06:24:49 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Fri Apr 20 06:24:52 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates restore.tpl Message-ID: User: finnarne-guest Date: 07/04/20 06:24:49 Modified: templates restore.tpl Log: Now it's possible to browse through deleted folders, and at list show, but not recover, deleted files Revision Changes Path 1.8 +6 -0 slbackup-php/templates/restore.tpl Index: restore.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/restore.tpl,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- restore.tpl 18 Apr 2007 12:00:29 -0000 1.7 +++ restore.tpl 20 Apr 2007 06:24:49 -0000 1.8 @@ -36,11 +36,17 @@ [DIR] {elseif $dir.type == "dir"} [DIR] + {elseif $dir.type == "deldir"} + [DIR] {else} [   ] {/if} {if $dir.type == "file"} {$dir.name} + {elseif $dir.type == "delfile"} + {$dir.name}(deleted) + {elseif $dir.type == deldir} + {$dir.name} ({t}Deleted{/t}) {else} {$dir.name} {/if} From pwinnertz-guest at alioth.debian.org Tue Apr 24 05:03:41 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Tue Apr 24 05:03:44 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian postinst Message-ID: User: pwinnertz-guest Date: 07/04/24 05:03:41 Modified: debian Tag: debian_branch_0_1 postinst Log: Removing bashism Revision Changes Path No revision No revision 1.4.2.5 +1 -1 slbackup-php/debian/postinst Index: postinst =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postinst,v retrieving revision 1.4.2.4 retrieving revision 1.4.2.5 diff -u -r1.4.2.4 -r1.4.2.5 --- postinst 18 Apr 2007 20:40:11 -0000 1.4.2.4 +++ postinst 24 Apr 2007 05:03:40 -0000 1.4.2.5 @@ -6,7 +6,7 @@ db_get slbackup-php/use-ssl || true -if [ "$RET" == "true" ]; then +if [ "$RET" = "true" ]; then if [ -x /usr/sbin/a2enmod ]; then /usr/sbin/a2enmod rewrite > /dev/null if [ -x /usr/sbin/invoke-rc.d ] ; then From pwinnertz-guest at alioth.debian.org Tue Apr 24 20:19:49 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Tue Apr 24 20:19:51 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian postinst Message-ID: User: pwinnertz-guest Date: 07/04/24 20:19:49 Modified: debian Tag: debian_branch_0_1 postinst Log: Revert my changes for -1 Revision Changes Path No revision No revision 1.4.2.6 +1 -1 slbackup-php/debian/postinst Index: postinst =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postinst,v retrieving revision 1.4.2.5 retrieving revision 1.4.2.6 diff -u -r1.4.2.5 -r1.4.2.6 --- postinst 24 Apr 2007 05:03:40 -0000 1.4.2.5 +++ postinst 24 Apr 2007 20:19:49 -0000 1.4.2.6 @@ -6,7 +6,7 @@ db_get slbackup-php/use-ssl || true -if [ "$RET" = "true" ]; then +if [ "$RET" == "true" ]; then if [ -x /usr/sbin/a2enmod ]; then /usr/sbin/a2enmod rewrite > /dev/null if [ -x /usr/sbin/invoke-rc.d ] ; then From finnarne-guest at alioth.debian.org Wed Apr 25 08:15:47 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 25 08:15:49 2007 Subject: [slbackup-commit] CVS update: slbackup-php/src index.php Message-ID: User: finnarne-guest Date: 07/04/25 08:15:47 Modified: src index.php Log: Now it works to restore a snapshot of a file Revision Changes Path 1.33 +163 -12 slbackup-php/src/index.php Index: index.php =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- index.php 20 Apr 2007 06:24:48 -0000 1.32 +++ index.php 25 Apr 2007 08:15:47 -0000 1.33 @@ -146,6 +146,123 @@ } else unset ($out) ; return $out ; } +function fetchsnapshot ($passwd, $clientdir, $location, $file) { +global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; + + $desc[0] = array ("pipe", "r") ; + $desc[1] = array ("pipe", "w") ; + $desc[2] = array ("file", "/tmp/error.log", "a") ; + + $env = array ('SSH_ASKPASS' => $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $cmd = sprintf ("ssh %s %s@%s 'mktemp'", + $ssh_options, $backupuser, + $backuphost) ; + + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + $tempfile = stream_get_contents($pipes[1]) ; + fclose ($pipes[1]) ; + proc_close ($proc) ; + } else unset ($tempfile) ; + if (empty($tempfile)) + return ; + $cmd = sprintf ("ssh %s %s@%s 'rdiff-backup --force %s/rdiff-backup-data/increments%s/%s %s'", + $ssh_options, $backupuser, + $backuphost, $clientdir, $location, $file, $tempfile ) ; + + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + $cmd = sprintf ("ssh %s %s@%s 'cat %s && rm %s'", + $ssh_options, $backupuser, + $backuphost, $tempfile, $tempfile) ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + $out = stream_get_contents($pipes[1]) ; + fclose ($pipes[1]) ; + proc_close ($proc) ; + } else unset ($out) ; + return $out ; +} + +function listfile ($passwd, $clientdir, $location, $file) { +global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; + + $out = array() ; + $parent = dirname ($file) ; + $base = basename ($file) ; + if (empty($file)) + return $out ; + if ($parent == ".") $parent="" ; + $out[] = array ('type' => 'parent', + 'name' => "Parent directory", + 'sub' => trim ($parent)) ; + + $desc[0] = array ("pipe", "r") ; + $desc[1] = array ("pipe", "w") ; + $desc[2] = array ("file", "/tmp/error.log", "a") ; + + $env = array ('SSH_ASKPASS' => $ssh_askpass, + 'DISPLAY' => ':nowhere') ; + $cmd = sprintf ("ssh %s %s@%s 'find %s%s/%s -maxdepth 1 -mindepth 1 -type f -name %s'", + $ssh_options, $backupuser, + $backuphost, $clientdir, $location, $parent, $base ) ; + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) { + $out[] = array ('type' => 'currentfile', + 'name' => basename (trim($line)), + 'sub' => substr (trim ($line), strlen ($clientdir) + strlen ($location) + 1)) ; + + } + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + $baselen= strlen ($base) ; + $cmd = sprintf ("ssh %s %s@%s 'find %s/rdiff-backup-data/increments%s/%s -maxdepth 1 -mindepth 1 -type f -name \"%s*.gz\"'", + $ssh_options, $backupuser, + $backuphost, $clientdir, $location, $parent, $base ) ; + + $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; + if (is_resource ($proc)) { + fprintf ($pipes[0], "%s\n", $passwd) ; + fclose ($pipes[0]) ; + while ($line = fgets ($pipes[1], 1024)) { + $gzbase = basename (trim($line)) ; + $type = substr ($gzbase, $baselen + 27) ; + $ts = substr($gzbase, $baselen + 1, 25) ; + $revision = $gzbase ; + while (($pos = strpos ($revision, '+')) !== false) + $revision = substr ($revision, 0,$pos) . '%2B' . substr ($revision, $pos + 1 ) ; + switch ($type) { + case "snapshot.gz": + case "diff.gz": + default: + $out[] = array ('type' => $type, + 'ts' => $ts, + 'name' => $base, + 'revision' => $revision, + 'parent' => sprintf ("%s/%s", $sub, $parent)) ; + break ; + } + } + fclose ($pipes[1]) ; + proc_close ($proc) ; + } + + return $out ; +} function listloc ($passwd, $clientdir, $location, $sub = "") { global $backuphost, $backupuser, $ssh_options, $ssh_askpass ; @@ -514,6 +631,9 @@ case "client": $client=htmlspecialchars(trim($value)) ; break ; + case "revision": + $revision=htmlspecialchars(trim($value)) ; + break ; default: $newconf[$key] = htmlspecialchars(trim($value)) ; break ; @@ -560,6 +680,7 @@ sscanf ($array[0], "%d", $config["minutes"]) ; sscanf ($array[1], "%d", $config["hours"]) ; } +unset ($revisions) ; switch ($submit) { case "scheduler": @@ -669,15 +790,41 @@ case "restorefile": if (empty($client) || empty ($newconf["location"])) break ; - $out = fetchfile ($passwd, - sprintf ("%s/%s", $config["server_destdir"], $client), - $newconf["location"], $newconf["file"]) ; - - header ('Content-Type: binary/raw') ; - header ('Content-Length: ' . strlen ($out)) ; - header (sprintf ("Content-Disposition: attachment; filename=\"%s\"", basename ($newconf["file"]))) ; - echo $out ; - exit ; + switch ($revision) { + case "current": + $out = fetchfile ($passwd, + sprintf ("%s/%s", + $config["server_destdir"], + $client), + $newconf["location"], $newconf["file"]) ; + header ('Content-Type: binary/raw') ; + header ('Content-Length: ' . strlen ($out)) ; + header (sprintf ("Content-Disposition: attachment; filename=\"%s\"", basename ($newconf["file"]))) ; + echo $out ; + exit ; + default: + if (empty($revision)) + $revisions = listfile ($passwd, + sprintf ("%s/%s", + $config["server_destdir"], + $client), + $newconf["location"], $newconf["sub"]) ; + else { + $out = fetchsnapshot ($passwd, + sprintf ("%s/%s", + $config["server_destdir"], + $client), + $newconf["location"], sprintf ("%s/%s", $newconf["parent"], $revision)) ; + header ('Content-Type: binary/raw') ; + header ('Content-Length: ' . strlen ($out)) ; + header (sprintf ("Content-Disposition: attachment; filename=\"%s\"", $newconf["name"])) ; + echo $out ; + exit ; +// debug (array ('client' => $client, 'serverdir' => $config['server_destdir'], 'revision' => $revision , 'newconf' => $newconf)) ; + } + break ; + } + break ; case "restorelocation": if (empty($client) || empty ($newconf["location"])) break ; @@ -713,10 +860,14 @@ } switch ($submit) { + case "restorefile": + if (empty($revisions)) + $revisions=array() ; + $smarty->assign ('revisions', $revisions) ; case "restorelocation": - $smarty->assign ('loc', $loc) ; - $smarty->assign ('location', $newconf["location"]) ; - $smarty->assign ('sub', $newconf["sub"]) ; + $smarty->assign ('loc', $loc) ; + $smarty->assign ('location', $newconf["location"]) ; + $smarty->assign ('sub', $newconf["sub"]) ; case "restoreclient": case "restore": $clients = array_keys($config["clients"]) ; From finnarne-guest at alioth.debian.org Wed Apr 25 08:15:47 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 25 08:15:49 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates restore.tpl Message-ID: User: finnarne-guest Date: 07/04/25 08:15:47 Modified: templates restore.tpl Log: Now it works to restore a snapshot of a file Revision Changes Path 1.9 +21 -2 slbackup-php/templates/restore.tpl Index: restore.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/restore.tpl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- restore.tpl 20 Apr 2007 06:24:49 -0000 1.8 +++ restore.tpl 25 Apr 2007 08:15:47 -0000 1.9 @@ -42,9 +42,9 @@ [   ] {/if} {if $dir.type == "file"} - {$dir.name} + {$dir.name} {elseif $dir.type == "delfile"} - {$dir.name}(deleted) + {$dir.name}(deleted) {elseif $dir.type == deldir} {$dir.name} ({t}Deleted{/t}) {else} @@ -52,5 +52,24 @@ {/if}
      {/foreach} + {foreach item=version name=version from=$revisions} + {if $version.type == "parent"} + [DIR] + {else} + [   ] + {/if} + {if $version.type == "parent"} + {$version.name} + {elseif $version.type == "currentfile"} + current + {elseif $version.type == "diff.gz"} + {$version.ts} + {elseif $version.type == "snapshot.gz"} + {$version.ts} + {else} + unknown snapshot type $version.type + {/if} +
      + {/foreach} From finnarne-guest at alioth.debian.org Wed Apr 25 08:23:09 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 25 08:23:10 2007 Subject: [slbackup-commit] CVS update: slbackup-php ChangeLog Message-ID: User: finnarne-guest Date: 07/04/25 08:23:09 Modified: . ChangeLog Log: Updated debian/ with files from 0.1-branch Revision Changes Path 1.2 +5 -0 slbackup-php/ChangeLog Index: ChangeLog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ChangeLog 18 Apr 2007 06:50:38 -0000 1.1 +++ ChangeLog 25 Apr 2007 08:23:09 -0000 1.2 @@ -1,3 +1,8 @@ +Wed, 25 Apr 2007 Finn-Arne Johansen + + * Release 0.2 + * Added restore of snapshots of a single file + Wed, 18 Apr 2007 Finn-Arne Johansen * Release 0.1 From finnarne-guest at alioth.debian.org Wed Apr 25 08:23:09 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 25 08:23:10 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog config control postinst rules templates Message-ID: User: finnarne-guest Date: 07/04/25 08:23:09 Modified: debian changelog control postinst rules Added: debian config templates Log: Updated debian/ with files from 0.1-branch Revision Changes Path 1.20 +3 -4 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- changelog 18 Apr 2007 06:50:38 -0000 1.19 +++ changelog 25 Apr 2007 08:23:09 -0000 1.20 @@ -1,7 +1,6 @@ -slbackup-php (0.1-0) experimental; urgency=low +slbackup-php (0.1-1) unstable; urgency=low - [ Finn-Arne Johansen ] - * First version ready for debian + * Initial upload (Closes: 419839) - -- Finn-Arne Johansen Wed, 18 Apr 2007 08:46:57 +0200 + -- Patrick Winnertz Wed, 18 Apr 2007 17:25:45 +0200 1.12 +2 -2 slbackup-php/debian/control Index: control =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/control,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- control 18 Apr 2007 05:24:51 -0000 1.11 +++ control 25 Apr 2007 08:23:09 -0000 1.12 @@ -1,8 +1,8 @@ Source: slbackup-php Section: misc Priority: optional -Maintainer: Finn-Arne Johansen -Uploaders: Morten Werner Olsen +Maintainer: Patrick Winnertz +Uploaders: Morten Werner Olsen , Finn-Arne Johansen Standards-Version: 3.7.2 Build-Depends: debhelper (>= 5), po-debconf, php5-cli 1.5 +15 -7 slbackup-php/debian/postinst Index: postinst =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postinst,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- postinst 17 Apr 2007 20:40:43 -0000 1.4 +++ postinst 25 Apr 2007 08:23:09 -0000 1.5 @@ -2,13 +2,19 @@ set -e -if [ -x /usr/sbin/a2enmod ] && [ -L /etc/apache2/mods-enabled/ssl.conf ]; then - /usr/sbin/a2enmod rewrite > /dev/null - if [ -x /usr/sbin/invoke-rc.d ] ; then - /usr/sbin/invoke-rc.d apache2 force-reload || : - else - [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || : - fi +. /usr/share/debconf/confmodule + +db_get slbackup-php/use-ssl || true + +if [ "$RET" == "true" ]; then + if [ -x /usr/sbin/a2enmod ]; then + /usr/sbin/a2enmod rewrite > /dev/null + if [ -x /usr/sbin/invoke-rc.d ] ; then + /usr/sbin/invoke-rc.d apache2 force-reload || : + else + [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || : + fi + fi fi mkdir -p /var/spool/slbackup-php @@ -17,4 +23,6 @@ chown www-data:www-data /var/spool/slbackup-php/ fi +db_stop + #DEBHELPER# 1.6 +2 -2 slbackup-php/debian/rules Index: rules =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/rules,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- rules 18 Apr 2007 06:50:38 -0000 1.5 +++ rules 25 Apr 2007 08:23:09 -0000 1.6 @@ -15,7 +15,7 @@ rm -f build-stamp -$(MAKE) clean dh_clean - #debconf-updatepo + debconf-updatepo install: build dh_testdir @@ -34,7 +34,7 @@ dh_installchangelogs dh_installdocs ./ChangeLog #dh_installdocs - #mv $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/ChangeLog $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/changelog + mv $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/ChangeLog $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/changelog dh_installcron dh_installdebconf dh_installman 1.2 +9 -0 slbackup-php/debian/config 1.2 +10 -0 slbackup-php/debian/templates From finnarne-guest at alioth.debian.org Wed Apr 25 08:24:27 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 25 08:24:29 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: finnarne-guest Date: 07/04/25 08:24:27 Modified: debian changelog Log: Prepare for the relase of 0.2 Revision Changes Path 1.21 +6 -0 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- changelog 25 Apr 2007 08:23:09 -0000 1.20 +++ changelog 25 Apr 2007 08:24:27 -0000 1.21 @@ -1,3 +1,9 @@ +slbackup-php (0.2-0) unstable; urgency=low + + * New upstream release + + -- Finn-Arne Johansen Wed, 25 Apr 2007 10:23:08 +0200 + slbackup-php (0.1-1) unstable; urgency=low * Initial upload (Closes: 419839) From finnarne-guest at alioth.debian.org Wed Apr 25 08:35:00 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 25 08:35:00 2007 Subject: [slbackup-commit] CVS update: slbackup-php/po nb_NO.po slbackup-php.pot Message-ID: User: finnarne-guest Date: 07/04/25 08:35:00 Modified: po nb_NO.po slbackup-php.pot Log: Translated a few more strings, updated template Revision Changes Path 1.7 +44 -23 slbackup-php/po/nb_NO.po Index: nb_NO.po =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/nb_NO.po,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- nb_NO.po 18 Apr 2007 06:01:15 -0000 1.6 +++ nb_NO.po 25 Apr 2007 08:35:00 -0000 1.7 @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: slbackup 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-18 07:58+0200\n" -"PO-Revision-Date: 2007-04-18 08:00+0200\n" +"POT-Creation-Date: 2007-04-25 10:31+0200\n" +"PO-Revision-Date: 2007-04-25 10:34+0200\n" "Last-Translator: Finn-Arne Johansen\n" "Language-Team: Norsk bokm??l\n" "MIME-Version: 1.0\n" @@ -79,13 +79,13 @@ msgstr "Kj?? sikkerhetskopiering klokken" #. templates/config.tpl -#: standard input:41 input:62 src/index.php:723 +#: standard input:41 input:62 src/index.php:924 msgid "Update" msgstr "Oppdater" #. templates/config.tpl #. templates/login.tpl -#: standard input:44 input:65 input:95 input:161 +#: standard input:44 input:65 input:95 input:170 msgid "Reset" msgstr "Tilbakestill" @@ -151,7 +151,7 @@ msgstr "Kataloger:" #. templates/config.tpl -#: standard input:101 src/index.php:721 +#: standard input:101 src/index.php:922 msgid "Add" msgstr "Legg til" @@ -170,90 +170,111 @@ msgid "Browse" msgstr "Bla" -#. templates/status.tpl +#. templates/restore.tpl #: standard input:119 +msgid "Restore of %1" +msgstr "Gjennoppretting av %1" + +#. templates/restore.tpl +#: standard input:122 +msgid "Deleted" +msgstr "Slettet" + +#. templates/status.tpl +#: standard input:125 msgid "Clients" msgstr "Klient" #. templates/status.tpl -#: standard input:122 +#: standard input:128 msgid "OK at %1" msgstr "OK %1" #. templates/status.tpl -#: standard input:125 +#: standard input:131 msgid "Failed at %1" msgstr "Feiler %1" #. templates/status.tpl -#: standard input:128 +#: standard input:134 msgid "Client never backed up" msgstr "Det er aldri tatt sikkerthetskopi av klienten" #. templates/status.tpl -#: standard input:131 +#: standard input:137 msgid "ssh-keys are working" msgstr "sshn??kler er satt rett opp" #. templates/status.tpl -#: standard input:134 +#: standard input:140 msgid "rdiff-backup-versions differ" msgstr "Det er forskjellig versjon av rdiff-backup" #. templates/status.tpl -#: standard input:137 +#: standard input:143 msgid "ssh-keys are not working" msgstr "sshn??kler er ikke satt korrekt opp" #. templates/status.tpl -#: standard input:140 +#: standard input:146 msgid "Backup status" msgstr "Status for Sikkerhetskopiering" #. templates/status.tpl -#: standard input:143 +#: standard input:149 msgid "Backup last finished at %1" msgstr "Sikkerhetskopiering ble fullf??rt %1" #. templates/status.tpl -#: standard input:146 +#: standard input:152 msgid "A new backup started at %1" msgstr "En ny sikkerhetskopieringsjobb ble startet %1" #. templates/login.tpl -#: standard input:149 +#: standard input:155 msgid "To read the configuration, you must log in as %1 on %2." msgstr "" "For ?? se p?? konfigurasjonen, m?? du logge inn som bruker %1 p?? maskinen %2" #. templates/login.tpl -#: standard input:152 +#: standard input:158 msgid "Please enter the password for the %1 account on %2:" msgstr "Legg inn passordet for bruker %1 p?? %2:" #. templates/login.tpl -#: standard input:155 +#: standard input:161 msgid "" "WARNING: you are about to send you password over an unencrypted link, please " "ask your administrator to enable https" msgstr "" -"ADVARSEL: Denne fobindelsen er ikke kryptert, og passordet vil kunne leses i klartekst om noen lytter p?? linjen. Be administratoren om ?? aktivere https for denne applikasjonen" +"ADVARSEL: Denne fobindelsen er ikke kryptert, og passordet vil kunne leses i " +"klartekst om noen lytter p?? linjen. Be administratoren om ?? aktivere https " +"for denne applikasjonen" + #. templates/login.tpl -#: standard input:158 +#: standard input:164 +msgid "" +"Login to this application is denied without the use of https. Please ask " +"your administrator to enable https" +msgstr "" +"Det er ikke mulig ?? logge inn uten bruk av https. Be din administrator om ?? sette opp bruken av https" + +#. templates/login.tpl +#: standard input:167 msgid "Login" msgstr "Logg inn" -#: src/index.php:565 +#: src/index.php:735 #, php-format msgid "No client specified :(" msgstr "Ingen klient ble valgt ?? slette" -#: src/index.php:570 +#: src/index.php:740 #, php-format msgid "Unable to find %s in the list of clients." msgstr "Fant ikke klienten %s i listen." -#: src/index.php:604 +#: src/index.php:774 #, php-format msgid "Unable to find %s in the locations of %s." msgstr "Finner ikke %s i listen av kataloger." 1.7 +38 -21 slbackup-php/po/slbackup-php.pot Index: slbackup-php.pot =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/po/slbackup-php.pot,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- slbackup-php.pot 18 Apr 2007 06:01:15 -0000 1.6 +++ slbackup-php.pot 25 Apr 2007 08:35:00 -0000 1.7 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-18 07:58+0200\n" +"POT-Creation-Date: 2007-04-25 10:31+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -80,13 +80,13 @@ msgstr "" #. templates/config.tpl -#: standard input:41 standard input:62 src/index.php:723 +#: standard input:41 standard input:62 src/index.php:924 msgid "Update" msgstr "" #. templates/config.tpl #. templates/login.tpl -#: standard input:44 standard input:65 standard input:95 standard input:161 +#: standard input:44 standard input:65 standard input:95 standard input:170 msgid "Reset" msgstr "" @@ -152,7 +152,7 @@ msgstr "" #. templates/config.tpl -#: standard input:101 src/index.php:721 +#: standard input:101 src/index.php:922 msgid "Add" msgstr "" @@ -171,89 +171,106 @@ msgid "Browse" msgstr "" -#. templates/status.tpl +#. templates/restore.tpl #: standard input:119 +msgid "Restore of %1" +msgstr "" + +#. templates/restore.tpl +#: standard input:122 +msgid "Deleted" +msgstr "" + +#. templates/status.tpl +#: standard input:125 msgid "Clients" msgstr "" #. templates/status.tpl -#: standard input:122 +#: standard input:128 msgid "OK at %1" msgstr "" #. templates/status.tpl -#: standard input:125 +#: standard input:131 msgid "Failed at %1" msgstr "" #. templates/status.tpl -#: standard input:128 +#: standard input:134 msgid "Client never backed up" msgstr "" #. templates/status.tpl -#: standard input:131 +#: standard input:137 msgid "ssh-keys are working" msgstr "" #. templates/status.tpl -#: standard input:134 +#: standard input:140 msgid "rdiff-backup-versions differ" msgstr "" #. templates/status.tpl -#: standard input:137 +#: standard input:143 msgid "ssh-keys are not working" msgstr "" #. templates/status.tpl -#: standard input:140 +#: standard input:146 msgid "Backup status" msgstr "" #. templates/status.tpl -#: standard input:143 +#: standard input:149 msgid "Backup last finished at %1" msgstr "" #. templates/status.tpl -#: standard input:146 +#: standard input:152 msgid "A new backup started at %1" msgstr "" #. templates/login.tpl -#: standard input:149 +#: standard input:155 msgid "To read the configuration, you must log in as %1 on %2." msgstr "" #. templates/login.tpl -#: standard input:152 +#: standard input:158 msgid "Please enter the password for the %1 account on %2:" msgstr "" #. templates/login.tpl -#: standard input:155 +#: standard input:161 msgid "" "WARNING: you are about to send you password over an unencrypted link, please " "ask your administrator to enable https" msgstr "" #. templates/login.tpl -#: standard input:158 +#: standard input:164 +msgid "" +"Login to this application is denied without the use of https. Please ask " +"your administrator to enable https" +msgstr "" + +#. templates/login.tpl +#: standard input:167 msgid "Login" msgstr "" -#: src/index.php:565 +#: src/index.php:735 #, php-format msgid "No client specified :(" msgstr "" -#: src/index.php:570 +#: src/index.php:740 #, php-format msgid "Unable to find %s in the list of clients." msgstr "" -#: src/index.php:604 +#: src/index.php:774 #, php-format msgid "Unable to find %s in the locations of %s." msgstr "" From finnarne-guest at alioth.debian.org Wed Apr 25 08:37:08 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 25 08:37:09 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian postinst Message-ID: User: finnarne-guest Date: 07/04/25 08:37:08 Modified: debian postinst Log: Someone says this fixes some bashism Revision Changes Path 1.6 +1 -1 slbackup-php/debian/postinst Index: postinst =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/postinst,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- postinst 25 Apr 2007 08:23:09 -0000 1.5 +++ postinst 25 Apr 2007 08:37:08 -0000 1.6 @@ -6,7 +6,7 @@ db_get slbackup-php/use-ssl || true -if [ "$RET" == "true" ]; then +if [ "$RET" = "true" ]; then if [ -x /usr/sbin/a2enmod ]; then /usr/sbin/a2enmod rewrite > /dev/null if [ -x /usr/sbin/invoke-rc.d ] ; then From finnarne-guest at alioth.debian.org Wed Apr 25 08:44:12 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 25 08:44:13 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian/po POTFILES.in templates.pot Message-ID: User: finnarne-guest Date: 07/04/25 08:44:12 Added: debian/po POTFILES.in templates.pot Log: Added more files from debian_branch_0_1 Revision Changes Path 1.2 +1 -0 slbackup-php/debian/po/POTFILES.in 1.2 +39 -0 slbackup-php/debian/po/templates.pot From finnarne-guest at alioth.debian.org Wed Apr 25 09:27:16 2007 From: finnarne-guest at alioth.debian.org (finnarne-guest@alioth.debian.org) Date: Wed Apr 25 09:27:17 2007 Subject: [slbackup-commit] CVS update: slbackup-php/templates restore.tpl Message-ID: User: finnarne-guest Date: 07/04/25 09:27:16 Modified: templates restore.tpl Log: Maybe better icons Revision Changes Path 1.10 +2 -2 slbackup-php/templates/restore.tpl Index: restore.tpl =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/templates/restore.tpl,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- restore.tpl 25 Apr 2007 08:15:47 -0000 1.9 +++ restore.tpl 25 Apr 2007 09:27:16 -0000 1.10 @@ -39,7 +39,7 @@ {elseif $dir.type == "deldir"} [DIR] {else} - [   ] + [   ] {/if} {if $dir.type == "file"} {$dir.name} @@ -56,7 +56,7 @@ {if $version.type == "parent"} [DIR] {else} - [   ] + [   ] {/if} {if $version.type == "parent"} {$version.name} From pwinnertz-guest at alioth.debian.org Thu Apr 26 05:44:32 2007 From: pwinnertz-guest at alioth.debian.org (pwinnertz-guest@alioth.debian.org) Date: Thu Apr 26 05:44:33 2007 Subject: [slbackup-commit] CVS update: slbackup-php/debian changelog Message-ID: User: pwinnertz-guest Date: 07/04/26 05:44:32 Modified: debian Tag: debian_branch_0_2 changelog Log: Adding new 0.2-1 entry for debian, modified 0.1-1 entry (The initial upload will be v0.2 not v0.1 Revision Changes Path No revision No revision 1.21.2.1 +7 -1 slbackup-php/debian/changelog Index: changelog =================================================================== RCS file: /cvsroot/slbackup/slbackup-php/debian/changelog,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -u -r1.21 -r1.21.2.1 --- changelog 25 Apr 2007 08:24:27 -0000 1.21 +++ changelog 26 Apr 2007 05:44:31 -0000 1.21.2.1 @@ -1,3 +1,9 @@ +slbackup-php (0.2-1) unstable; urgency=low + + * Initial upload (Closes: #419839) + + -- Patrick Winnertz Thu, 26 Apr 2007 07:45:57 +0200 + slbackup-php (0.2-0) unstable; urgency=low * New upstream release @@ -6,7 +12,7 @@ slbackup-php (0.1-1) unstable; urgency=low - * Initial upload (Closes: 419839) + * Initial upload into Debian-Edu archive -- Patrick Winnertz Wed, 18 Apr 2007 17:25:45 +0200