wok-current view backuppc/stuff/etc/BackupPC/shutdown.sh @ rev 15603
Use install instead of _pkg
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Dec 06 10:39:07 2013 +0000 (2013-12-06) |
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