Commit b365eaf4 authored by Denis Bonnenfant's avatar Denis Bonnenfant
Browse files

mise az jour

parent 69349b73
#!/bin/bash
version="3.9.4"
SSH="ssh -p 2222 root@deb.sambaedu.org"
if [ -z "$1" ]; then
paquet="sambaedu-wpkg"
fi
......@@ -11,7 +15,10 @@ cd ../sources
rm -f $debs
dch -U -i ""
debuild -us -uc -b
scp -P 2222 $debs root@wawadeb.crdp.ac-caen.fr:/root/se4
ssh -p 2222 root@wawadeb.crdp.ac-caen.fr "se4/se4.sh $version"
$SSH "mkdir -p /root/tmpse4"
scp -P 2222 $debs root@deb.sambaedu.org:/root/tmpse4
$SSH "for deb in \$(ls /root/tmpse4/*.deb); do echo \"traitement de \$deb\"; reprepro -C se4XP -b /var/www/debian includedeb stretch \$deb; done"
$SSH "rm -fr /root/tmpse4"
#ssh root@admin.sambaedu3.maison "apt-get update && apt-get -y upgrade $deb"
cd
\ No newline at end of file
cd
This diff is collapsed.
......@@ -9,15 +9,34 @@
* @Licence Distribue sous la licence GPL
*/
/**
*
* @Repertoire: wpkg
* file: wpkg_lib_load_xml.php
*/
*/
if ($fp = fopen("/var/lock/wpkg.lock", 'w+')) {
$startTime = microtime();
do {
$canRead = flock($fp, LOCK_SH);
// If lock not obtained sleep for 0 - 100 milliseconds, to avoid collision and CPU load
if (! $canWRead)
usleep(round(rand(0, 100) * 1000));
} while ((! $canRead) and ((microtime() - $startTime) < 1000));
// file was locked so now we can store information
if ($canRead) {
$xml_packages = simplexml_load_file($url_packages);
$xml_profiles = simplexml_load_file($url_profiles);
$xml_rapports = simplexml_load_file($url_rapports);
$xml_time = simplexml_load_file($url_time);
$xml_hosts = simplexml_load_file($url_hosts);
$xml_forum = simplexml_load_file($url_forum);
flock($fp, LOCK_UN);
} else {
die ("erreur, impossible de lire les xml");
}
}
$xml_packages = simplexml_load_file($url_packages);
$xml_profiles = simplexml_load_file($url_profiles);
$xml_rapports = simplexml_load_file($url_rapports);
$xml_time = simplexml_load_file($url_time);
$xml_hosts = simplexml_load_file($url_hosts);
$xml_forum = simplexml_load_file($url_forum);
?>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment