commit
da39975867
10 changed files with 126 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||||||
|
#!/bin/sh |
||||||
|
|
||||||
|
TOTSESSION=$1 |
||||||
|
MIN=$((TOTSESSION/60)) |
||||||
|
|
||||||
|
while [ $MIN -gt 0 ]; do |
||||||
|
clear > /dev/tty9 |
||||||
|
echo "Sessione in corso..." > /dev/tty9 |
||||||
|
echo "Minuti rimanenti: $MIN" > /dev/tty9 |
||||||
|
|
||||||
|
/dragas/generate_html.sh $MIN > /tmp/dragas/index.html |
||||||
|
|
||||||
|
MIN=$((MIN-1)); |
||||||
|
sleep 59; |
||||||
|
done |
||||||
@ -0,0 +1,19 @@ |
|||||||
|
#!/usr/bin/perl |
||||||
|
|
||||||
|
use IO::Socket; |
||||||
|
my $sock = new IO::Socket::INET ( |
||||||
|
LocalHost => '', |
||||||
|
LocalPort => '7071', |
||||||
|
Proto => 'tcp', |
||||||
|
Listen => 1, |
||||||
|
Reuse => 1, |
||||||
|
); |
||||||
|
die "Could not create socket: $!\n" unless $sock; |
||||||
|
my $new_sock = $sock->accept(); |
||||||
|
while(<$new_sock>) { |
||||||
|
# print $_; |
||||||
|
# system("/usr/bin/killall VBoxSVC"); |
||||||
|
system("/usr/bin/pkill -9 X"); |
||||||
|
system("/usr/bin/pkill -9 perl"); |
||||||
|
} |
||||||
|
close($sock); |
||||||
@ -0,0 +1,20 @@ |
|||||||
|
#!/usr/bin/perl |
||||||
|
|
||||||
|
use IO::Socket; |
||||||
|
my $sock = new IO::Socket::INET ( |
||||||
|
LocalHost => '', |
||||||
|
LocalPort => '7070', |
||||||
|
Proto => 'tcp', |
||||||
|
Listen => 1, |
||||||
|
Reuse => 1, |
||||||
|
); |
||||||
|
die "Could not create socket: $!\n" unless $sock; |
||||||
|
my $new_sock = $sock->accept(); |
||||||
|
while(<$new_sock>) { |
||||||
|
# print $_; |
||||||
|
system("sudo /dragas/chillicount1.sh $_"); |
||||||
|
system("/usr/bin/sudo /dragas/launchde.sh"); |
||||||
|
system("/usr/bin/pkill -9 X"); |
||||||
|
system("/usr/bin/pkill -9 perl"); |
||||||
|
} |
||||||
|
close($sock); |
||||||
@ -0,0 +1,36 @@ |
|||||||
|
#!/bin/bash |
||||||
|
PATH="/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/pkg/bin:/usr/pkg/sbin" |
||||||
|
export PATH |
||||||
|
|
||||||
|
exec > /tmp/daily_maint.log |
||||||
|
exec 2>&1 |
||||||
|
|
||||||
|
mkdir /tmp/dragas; cp /dragas/note.html /tmp/dragas/ |
||||||
|
|
||||||
|
|
||||||
|
echo "Waiting for network to settle (3 minutes)..." |
||||||
|
sleep 30s; |
||||||
|
echo "2.30 minutes left..." |
||||||
|
sleep 30s; |
||||||
|
echo "2 minutes left..." |
||||||
|
sleep 30s; |
||||||
|
echo "1.30 minute left..." |
||||||
|
sleep 30s; |
||||||
|
echo "1 minute left..." |
||||||
|
sleep 30s; |
||||||
|
echo "30 seconds left..." |
||||||
|
sleep 30s; |
||||||
|
echo "Proceeding..." |
||||||
|
|
||||||
|
cd /usr/local/bibliosangio |
||||||
|
git pull |
||||||
|
|
||||||
|
cp /dragas/note.html /tmp/dragas/ |
||||||
|
|
||||||
|
docker pull biblioregistry.dragashosting.com/timeleft |
||||||
|
docker pull biblioregistry.dragashosting.com/bibliochromium |
||||||
|
docker pull biblioregistry.dragashosting.com/bibliomate |
||||||
|
|
||||||
|
docker image prune -f |
||||||
|
|
||||||
|
echo "Done!" |
||||||
@ -0,0 +1,17 @@ |
|||||||
|
#!/bin/sh |
||||||
|
|
||||||
|
echo "<html>" |
||||||
|
echo " <head>" |
||||||
|
echo " <title>Residuo: $1 minuti</title>" |
||||||
|
echo " <meta http-equiv="refresh" content="30">" |
||||||
|
echo " </head> " |
||||||
|
echo " <body> " |
||||||
|
echo "<h2>Tempo Residuo di utilizzo: $1 minuti</h2><br>" |
||||||
|
echo "<br><br>" |
||||||
|
echo '<h2>Per iniziare a navigare, <a href="https://www.google.it" target="_blank">cliccare qui.</a></h2><br><br>' |
||||||
|
echo '<h3>Per chiudere la sessione, cliccare su "Sistema" e "Termina Sessione"</h3><br><br>' |
||||||
|
echo 'Per indicazioni e note, <a href="http://172.17.0.1:8000/note.html" target="_blank">cliccare qui.</a><br><br>' |
||||||
|
echo "Si consiglia di minimizzare questa finestra. Il tempo residuo restera' bene in vista nella barra inferiore.<br>" |
||||||
|
echo " </body> " |
||||||
|
echo "</html> " |
||||||
|
|
||||||
@ -0,0 +1,7 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
perl /dragas/chillilisten.pl & |
||||||
|
perl /dragas/chillikill.pl & |
||||||
|
x11docker --desktop --hostipc --user=1500 biblioregistry.dragashosting.com/bibliochromium |
||||||
|
pkill -9 X; |
||||||
|
exit; |
||||||
@ -0,0 +1,5 @@ |
|||||||
|
#!/bin/bash |
||||||
|
/usr/bin/x11docker --vt=2 --desktop --sharedir=/media/usb0 --lang=it --hostipc --alsa --printer --user=4242 biblioregistry.dragashosting.com/bibliomate |
||||||
|
pkill -9 chillicount; |
||||||
|
pkill -9 X; |
||||||
|
exit; |
||||||
Loading…
Reference in new issue