Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SambaEdu
sambaedu-wpkg
Commits
b365eaf4
Commit
b365eaf4
authored
Jun 06, 2019
by
Denis Bonnenfant
Browse files
mise az jour
parent
69349b73
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
build/build.sh
View file @
b365eaf4
#!/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
sources/www/includes/wpkg_lib_admin.php
View file @
b365eaf4
This diff is collapsed.
Click to expand it.
sources/www/includes/wpkg_lib_load_xml.php
View file @
b365eaf4
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment