wok view backuppc/stuff/etc/BackupPC/shutdown.sh @ rev 18255
Up tazpkg(825): restore tazpkg working
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Aug 04 17:15:28 2015 +0300 (2015-08-04) |
parents | |
children |
line source
1 #!/bin/sh
3 # In /etc/BackupPC/config.pl:
4 # $Conf{DumpPostUserCmd} = '/etc/backuppc/shutdown.sh $host $xferOK';
6 ADMUSER=administrator
7 ADMPASS=passwdadministrator
9 if [ $(date +%k) -lt 07 -o $(date +%k ) -gt 20 ]; then
10 /usr/bin/net rpc SHUTDOWN -f -I $1 -U $ADMUSER%$ADMPASS -t 30
11 else
12 msg="Backup failed."
13 [ $2 = 1 ] && msg="Backup successful."
14 echo "$msg" | smbclient -M $1 --user="backuppc"
15 fi