wok-6.x diff backuppc/stuff/etc/BackupPC/shutdown.sh @ rev 15985
atftp: add to ARM arch
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Mar 02 00:40:54 2014 +0100 (2014-03-02) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/backuppc/stuff/etc/BackupPC/shutdown.sh Sun Mar 02 00:40:54 2014 +0100 1.3 @@ -0,0 +1,15 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +# In /etc/BackupPC/config.pl: 1.7 +# $Conf{DumpPostUserCmd} = '/etc/backuppc/shutdown.sh $host $xferOK'; 1.8 + 1.9 +ADMUSER=administrator 1.10 +ADMPASS=passwdadministrator 1.11 + 1.12 +if [ $(date +%k) -lt 07 -o $(date +%k ) -gt 20 ]; then 1.13 + /usr/bin/net rpc SHUTDOWN -f -I $1 -U $ADMUSER%$ADMPASS -t 30 1.14 +else 1.15 + msg="Backup failed." 1.16 + [ $2 = 1 ] && msg="Backup successful." 1.17 + echo "$msg" | smbclient -M $1 --user="backuppc" 1.18 +fi