You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
521 B
22 lines
521 B
#!/bin/bash
|
|
|
|
WINEXE=/usr/bin/winexe
|
|
|
|
if [ ! -z $2 ]; then
|
|
UNAME=$2
|
|
fi
|
|
if [ ! -z $3 ]; then
|
|
PASS=$3
|
|
fi
|
|
|
|
# Timeout after 5 minutes
|
|
TIMEOUT=300
|
|
|
|
BOX=$1
|
|
|
|
if [[ ! -z $UNAME && ! -z $PASS ]]; then
|
|
/usr/bin/timeout $TIMEOUT $WINEXE -s /dev/null -U $UNAME --password=$PASS //$BOX 'cmd /c echo '1' > c:\backuppc\wake.up' <&-
|
|
else
|
|
/usr/bin/timeout $TIMEOUT $WINEXE -s /dev/null --authentication-file=/etc/BackupPC/win.conf //$BOX 'cmd /c echo '1' > c:\backuppc\wake.up' <&-
|
|
fi
|
|
echo "Rsync and shadow copy unloaded"
|
|
|