1 From: Dan Langille <dan@langille.org>
2 To: bacula-devel@lists.sourceforge.net
3 Subject: [Bacula-devel] script for creating many client FDs
4 Date Tue, 2 Dec 2003 19:41:28 -0500 (EST)
6 I created this script which may be useful to others. If you have to
7 create a bacula-fd.conf file for more than a few clients, it can become
8 time consuming, not to mention error prone.
13 client-build.sh : usage client-build.sh DIRNAME DIRPASSWD CLIENTNAME
16 Where DIRNAME is the director name which can contact this client
17 PASSWD is the passwd to be supplied by the director
18 CLIENTNAME is the name of the client file daemon
20 The script creates ./tmp and places all output there.
22 bacula-fd.conf.in is the template it uses for creating the client scripts
23 and it must reside in the same directory as the script.
27 Dan Langille - http://www.langille.org/
29 ==== bacula-fd.conf.in template ======
31 # Default Bacula File Daemon Configuration file
33 # For Bacula release 1.32b (14 Oct 2003) -- freebsd 4.8-STABLE
35 # There is not much to change here except perhaps the
40 # List Directors who are permitted to contact this File daemon
44 Password = "@dir-password@"
48 # "Global" File daemon configuration specifications
52 FDport = 9102 # where we listen for the director
53 WorkingDirectory = /var/db/bacula
54 Pid Directory = /var/run
57 # Send all messages except skipped files back to Director
60 director = undef-dir = all, !skipped
62 === end bacula-fd.conf.in template ========
65 ==== client-build.sh ===========
68 # Copyright 2003 Dan Langille <dan@langille.org>
70 # Use as you wish, but keep retain this copyright notice.
71 # Please forward improvements.
73 # usage client-build.sh DIRNAME DIRPASSWD CLIENTNAME [CLIENTNAME...]
75 # Where DIRNAME is the director name which can contact this client
76 # PASSWD is the passwd to be supplied by the director
77 # CLIENTNAME is the name of the client file daemon
79 # This script creates ./tmp and places all output there.
81 # bacula-fd.conf.in is the template it uses for creating the client scripts.
87 echo $0 : usage $0 DIRNAME DIRPASSWD CLIENTNAME [CLIENTNAME...]
98 echo creating stuff for $DIRNAME with password $DIRPASSWD
100 while [ $# -gt 0 ] ; do
103 echo "creating config for " $CLIENT
104 sed "s/@dir-name@/undef-dir/;s/@dir-password@/password/;s/@client-name@/$CLIENT/" bacula-fd.conf.in > ./tmp/$CLIENT-bacula-fd.conf
106 === end client-build.sh ===============