# This routine creates the Bacula database
 # using PostgreSQL, Ingres, MySQL, or SQLite.
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 
 default_db_type=@DEFAULT_DB_TYPE@
 
 #
 # shell script to create Bacula database(s)
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 
 bindir=@MYSQL_BINDIR@
 
 #
 # shell script to create Bacula database(s)
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 
 PATH="@POSTGRESQL_BINDIR@:$PATH"
 
 #
 # shell script to create Bacula SQLite tables
 #
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
-#
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 
 bindir=@SQLITE_BINDIR@
 PATH=$bindir:$PATH
 
 #
 # This script deletes a catalog dump
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 db_name=@db_name@
 
 
 # Bacula tables for PostgreSQL or MySQL.
 # SQLite does not have permissions.
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 
 default_db_type=@DEFAULT_DB_TYPE@
 
 #
 # shell script to grant privileges to the bacula database
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 db_user=${db_user:-@db_user@}
 bindir=@MYSQL_BINDIR@
 
 #
 # shell script to grant privileges to the bacula database
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 db_user=${db_user:-@db_user@}
 bindir=@POSTGRESQL_BINDIR@
 
 #
 # shell script to grant privileges to the bacula database
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 bindir=@SQLITE_BINDIR@
 
 
 # This routine makes the appropriately configured
 # Bacula tables for PostgreSQL, Ingres, MySQL, or SQLite.
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 
 default_db_type=@DEFAULT_DB_TYPE@
 
 #!/bin/sh
 #
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 #
 # This script dumps your Bacula catalog in ASCII format
 
     umask(0077);
 
     if ($args{db_address}) {
-        $ENV{PGHOST}=$args{db_address};
+       $ENV{PGHOST}=$args{db_address};
     }
     if ($args{db_socket}) {
-        $ENV{PGHOST}=$args{db_socket};
+       $ENV{PGHOST}=$args{db_socket};
     }
     if ($args{db_port}) {
-        $ENV{PGPORT}=$args{db_port};
+       $ENV{PGPORT}=$args{db_port};
     }
     if ($args{db_user}) {
-        $ENV{PGUSER}=$args{db_user};
+       $ENV{PGUSER}=$args{db_user};
     }
     if ($args{db_password}) {
-        $ENV{PGPASSWORD}=$args{db_password};
+       $ENV{PGPASSWORD}=$args{db_password};
     }
     $ENV{PGDATABASE}=$args{db_name};
     exec("HOME='$wd' pg_dump -c > '$wd/$args{db_name}.sql'");
     print "Error while executing postgres dump $!\n";
-    return 1;               # in case of error
+    return 1;              # in case of error
 }
 
 sub dump_mysql
     umask(0077);
     unlink("$wd/.my.cnf");
     open(MY, ">$wd/.my.cnf")
-        or die "Can't open $wd/.my.cnf for writing $@";
+       or die "Can't open $wd/.my.cnf for writing $@";
 
     $args{db_address} = $args{db_address} || "localhost";
     my $addr = "host=$args{db_address}";
-    if ($args{db_socket}) {     # unix socket is fastest than net socket
-        $addr = "socket=$args{db_socket}";
+    if ($args{db_socket}) {    # unix socket is fastest than net socket
+       $addr = "socket=$args{db_socket}";
     }
 
     print MY "[client]
 password=$args{db_password}
 ";
     if ($args{db_port}) {
-        print MY "port=$args{db_port}\n";
+       print MY "port=$args{db_port}\n";
     }
 
     close(MY);
 {
     my %args = @_;
     if ($args{db_type} eq 'SQLite3') {
-        $ENV{PATH}="@SQLITE_BINDIR@:$ENV{PATH}";
-        dump_sqlite3(%args);
+       $ENV{PATH}="@SQLITE_BINDIR@:$ENV{PATH}";
+       dump_sqlite3(%args);
     } elsif ($args{db_type} eq 'PostgreSQL') {
-        $ENV{PATH}="@POSTGRESQL_BINDIR@:$ENV{PATH}";
-        dump_pgsql(%args);
+       $ENV{PATH}="@POSTGRESQL_BINDIR@:$ENV{PATH}";
+       dump_pgsql(%args);
     } elsif ($args{db_type} eq 'MySQL') {
-        $ENV{PATH}="@MYSQL_BINDIR@:$ENV{PATH}";
-        dump_mysql(%args);
+       $ENV{PATH}="@MYSQL_BINDIR@:$ENV{PATH}";
+       dump_mysql(%args);
     } else {
-        die "This database type isn't supported";
+       die "This database type isn't supported";
     }
 }
 
 while(my $l = <FP>)
 {
     if ($l =~ /catalog=(.+)/) {
-        if (exists $cfg{catalog} and $cfg{catalog} eq $cat) {
-            exit dump_catalog(%cfg);
-        }
-        %cfg = ();              # reset
+       if (exists $cfg{catalog} and $cfg{catalog} eq $cat) {
+           exit dump_catalog(%cfg);
+       }
+       %cfg = ();              # reset
     }
 
     if ($l =~ /(\w+)=(.+)/) {
-        $cfg{$1}=$2;
+       $cfg{$1}=$2;
     }
 }
 
 
 #   You won't get any support for performance issue if you changed the default
 #   schema.
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 bindir=@MYSQL_BINDIR@
 PATH="$bindir:$PATH"
 
 #   You won't get any support for performance issue if you changed the default
 #   schema.
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 bindir=@POSTGRESQL_BINDIR@
 PATH="$bindir:$PATH"
 
 #
 # shell script to create Bacula SQLite tables
 #
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 
 bindir=@SQLITE_BINDIR@
 
 # This routine alters the appropriately configured
 # Bacula tables for PostgreSQL, Ingres, MySQL, or SQLite.
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 
 default_db_type=@DEFAULT_DB_TYPE@
 
 #
 # Shell script to update MySQL Community version 5.0.x to 5.2.x
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 
 echo " "
 
 # Shell script to update PostgreSQL tables from version 12 to 14
 #  or Bacula Community version 5.0.x to 5.2.x
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 
 echo " "
 
 #
 # Shell script to update sqlite3 tables from Bacula Community version 5.0.x to 5.2.x
 #
-#
-#  Bacula® - The Network Backup Solution
-#
-#  Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
-#
-#  The main author of Bacula is Kern Sibbald, with contributions from many
-#  others, a complete list can be found in the file AUTHORS.
-#
-#  You may use this file and others of this release according to the
-#  license defined in the LICENSE file, which includes the Affero General
-#  Public License, v3.0 ("AGPLv3") and some additional permissions and
-#  terms pursuant to its AGPLv3 Section 7.
-#
-#  Bacula® is a registered trademark of Kern Sibbald.
+#  Author:  Kern Sibbald
+#  License: LGPLv3
 #
 
 echo " "