Miniha: Unterschied zwischen den Versionen

Aus metasec wiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „zphone_sync_nodes.sh <pre> #!/bin/bash if [ -e /etc/metasec/ha.conf ];then . /etc/metasec/ha.conf else exit fi rsync -az $node1:/var/www/* /var/www/ rsync -az…“)
 
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 9: Zeile 9:
 
fi
 
fi
  
rsync -az $node1:/var/www/* /var/www/
+
if [ ! -e /tmp/$0 ];then
rsync -az $node1:/tftpdboot/* /tftpdboot/
+
rsync -az $node1:/var/lib/asterisk/* /var/lib/asterisk/
+
rsync -az $node1:/var/spool/asterisk/* /var/spool/asterisk/
+
rsync -az $node1:/etc/asterisk/* /etc/asterisk/
+
rsync -az $node1:/etc/exim4/* /etc/exim4/
+
rsync -az $node1:/etc/hylafax/* /etc/hylafax/
+
  
 +
    touch /tmp/$0
 +
 +
    rsync -az zphone-arz:/var/www/* /var/www/
 +
    rsync -az zphone-arz:/tftpdboot/* /tftpdboot/
 +
    rsync -az zphone-arz:/var/lib/asterisk/* /var/lib/asterisk/
 +
    rsync -az zphone-arz:/var/spool/asterisk/* /var/spool/asterisk/
 +
    rsync -az zphone-arz:/etc/asterisk/* /etc/asterisk/
 +
    rsync -az zphone-arz:/etc/exim4/* /etc/exim4/
 +
    rsync -az zphone-arz:/etc/hylafax/* /etc/hylafax/
 +
 +
    rm /tmp/$0
 +
 +
fi;
 +
 +
</pre>
 +
 +
/etc/cron.d/zphone_sync_nodes
 +
<pre>
 +
# zphone_sync cron timeplaner script
 +
# generiert am: 2010/07/28 12:36
 +
* *  * * *  root    /root/zphone_sync_nodes.sh > /dev/null 2>/dev/null
 
</pre>
 
</pre>

Aktuelle Version vom 22. September 2010, 20:15 Uhr

zphone_sync_nodes.sh

#!/bin/bash
if [ -e /etc/metasec/ha.conf ];then
 . /etc/metasec/ha.conf
else
 exit
fi

if [ ! -e /tmp/$0 ];then

    touch /tmp/$0

    rsync -az zphone-arz:/var/www/* /var/www/
    rsync -az zphone-arz:/tftpdboot/* /tftpdboot/
    rsync -az zphone-arz:/var/lib/asterisk/* /var/lib/asterisk/
    rsync -az zphone-arz:/var/spool/asterisk/* /var/spool/asterisk/
    rsync -az zphone-arz:/etc/asterisk/* /etc/asterisk/
    rsync -az zphone-arz:/etc/exim4/* /etc/exim4/
    rsync -az zphone-arz:/etc/hylafax/* /etc/hylafax/

    rm /tmp/$0

fi;

/etc/cron.d/zphone_sync_nodes

# zphone_sync cron timeplaner script
# generiert am: 2010/07/28 12:36
* *   * * *   root     /root/zphone_sync_nodes.sh > /dev/null 2>/dev/null