#!/bin/bash
#
# Remote Win32 client upgrade script
-# written by Michel Meyers (last update 02/02/04 16:10)
+# written by Michel Meyers (last update 2006-09-25 11:34)
#
# WARNING: Make sure that no bacula-fd.conf exists in the source directory!
# You will destroy/overwrite all your client's configs if you don't
# upgrade
upgrade() {
-rpcclient -S $SERVERNAME -U $USERNAME%"$PASSWORD" -c "service stop bacula"
+net rpc -S $SERVERNAME -U $USERNAME%"$PASSWORD" service stop bacula
sleep 30
smbmount //$SERVERNAME/c$ /mnt -o username=$USERNAME,password="$PASSWORD"
cp /home/michel/winbacula/bin/* /mnt/bacula/bin
umount /mnt
-rpcclient -S $SERVERNAME -U $USERNAME%"$PASSWORD" -c "service start bacula"
+net rpc -S $SERVERNAME -U $USERNAME%"$PASSWORD" service start bacula
}
SERVERNAME=xerxes
Note: The requirements are the same as described in my other document
(Samba-TNG clients among others, otherwise you'll be missing rpcclient).
+Update 2006-09-25: Samba-TNG is no longer required, the 'net' command from
+Samba 3 works for starting and stopping services. Paths may need to be
+updated with quotation marks as the new Bacula Win32 Installer no longer
+installs into C:\bacula but into 'C:\Program Files\bacula' (on English
+Windows versions).
+
+
Enjoy!