wok view backuppc/stuff/etc/BackupPC/shutdown.sh @ rev 25625
Add opendkim (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 08 17:14:09 2023 +0000 (13 months ago) |
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