wok-next view backuppc/stuff/etc/BackupPC/shutdown.sh @ rev 16492

May we have mercurial in i486 also...
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 23 14:42:13 2014 +0200 (2014-04-23)
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