home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ac-grenoble.fr
/
2015.02.ftp.ac-grenoble.fr.tar
/
ftp.ac-grenoble.fr
/
pub
/
slis
/
updates_rsync
/
slis_update-common-pre
< prev
next >
Wrap
Text File
|
2006-02-15
|
2KB
|
72 lines
#!/bin/bash
# slis_update-common-pre
# Common updates, started before version updates
### VARIABLES ###
UPDDIR=/home/hadmin/updates
LOGTAG="slis_update[$$]"
grep HOSTNAME /etc/sysconfig/network > /tmp/hostname
. /tmp/hostname
rm -rf /tmp/hostname
WEBMASTER=`ls -ld /home/httpd/html |awk '{print $3}'`
. /home/hadmin/slis.conf 2>/dev/null
. /usr/local/lib/slis-sys.inc.bash 2>/dev/null
load_config 2>/dev/null
##################
# Locking
if [ -e /var/lock/slis_upd ]
then
logger -t "$LOGTAG" "Lock found. Update already started."
exit
fi
touch /var/lock/slis_upd
sleep 1
logger -t "$LOGTAG" "Script Common-Pre started."
##############################
############################################################################
### Update SONDAGE1 - 14/02/2006
# Register the SLIS to http://www.slis.fr/sondage/register.php
# just to count the total number of installed SLIS
# This registering is only opened for this month. It will be disabled
# as soon as the total number is stabilized. Then, we'll be able to publish
# "As February 2006, there'are *N* SLIS up2date worldwild!"
############################################################################
if [ ! \( -e $UPDDIR/SONDAGE1 \) ]
then
HOST=`hostname -s`
DOMAIN=`hostname -d`
VERSION=`cat /etc/version_slis_num`
wget -t 1 -T 20 -q -O /tmp/sondage "http://www.slis.fr/sondage/register.php?action=register&host=$HOST&domain=$DOMAIN&version=$VERSION"
RC=$?
if [ $RC = 0 ]
then
if [ "`egrep "Bad|ERROR" /tmp/sondage`" != "" ]
then
wget -q -O /dev/null "http://www.slis.fr/sondage/register.php?action=error"
fi
touch $UPDDIR/SONDAGE1
logger -t "$LOGTAG" "Update SONDAGE1 done."
fi
fi
###
##############################
logger -t "$LOGTAG" "Script Common-Pre ended."
/bin/rm -rf /var/lock/slis_upd