Changes
From SME Server
Jump to navigation
Jump to search
← Older edit
Newer edit →
BackupPC
(view source)
Revision as of 18:11, 3 December 2013
1,085 bytes added
,
18:11, 3 December 2013
→DB properties
Line 160:
Line 160:
visudo
visudo
And close the file. If visudo detects an error, it'll tell you. }}
And close the file. If visudo detects an error, it'll tell you. }}
+
+
as an example if you want to be able to wake on lan :
+
config setprop backuppc sudo `config getprop backuppc sudo`,/sbin/ether-wake
+
signal-event backuppc-update
+
+
then simply add a script to your prebackup command or your ping command like :
+
+
+
#!/bin/sh
+
# Set the mac address for each host
+
host1_mac=<mac address>
+
host1_name=<host name>
+
host2_mac=<mac address>
+
host2_name=<host name>
+
# How long does the host take to boot
+
boottime=120
+
# Which interface to send the WoL packets out of
+
interface=eth0
+
# Function to check if the host pings
+
pingcheck()
+
{
+
ping -w 5 -c 2 $1
+
export pingstatus=$?
+
}
+
case $1 in
+
host1)
+
sudo etherwake -i $interface $host1_mac
+
sleep $boottime
+
pingcheck $host1_name
+
exit $pingstatus
+
;;
+
host2)
+
sudo etherwake -i $interface $host2_mac
+
sleep $boottime
+
pingcheck $host2_name
+
exit $pingstatus
+
;;
+
*)
+
echo "Unknown machine $1"
+
exit 1
+
;;
+
esac
=== Operation ===
=== Operation ===
Unnilennium
Super Admin, Wiki & Docs Team,
Bureaucrats
,
Interface administrators
,
Administrators
3,260
edits
Navigation menu
Page actions
Page
Discussion
View source
History
Page actions
Page
Discussion
More
Tools
In other languages
Personal tools
English
Log in
Koozali SME Server
Main Page
Welcome
Releases
Testimonials
Documentation
SME Server FAQ
Volunteering
Commercial Support
Recent activities
Dashboard
Recent wiki changes
Recent bug changes
Unread Forum posts
Koozali resources
Contribs
How-To's
Forums
Bugzilla
Mailing Lists
Translations
Download
Koozali SME Server wiki
Wiki statistics
Wiki categories
Wiki Help
Koozali Wiki Help
Tools
Special pages
Printable version
Search