Updating filesystem pathes in cgi.
This commit is contained in:
parent
2341a43cbf
commit
f71b92cb67
12
cgi/cgi
12
cgi/cgi
|
@ -8,11 +8,11 @@
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
# Reading defaults
|
# Reading defaults
|
||||||
if [ -r /etc/default/live-webhelper ]
|
if [ -r /etc/default/live-helper.cgi ]
|
||||||
then
|
then
|
||||||
. /etc/default/live-webhelper
|
. /etc/default/live-helper.cgi
|
||||||
else
|
else
|
||||||
echo "E: /etc/default/live-webhelper missing"
|
echo "E: /etc/default/live-helper.cgi missing"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ else
|
||||||
|
|
||||||
# Writing build file
|
# Writing build file
|
||||||
cat > "${_TEMPDIR}"/"${_BUILD}".build << EOF
|
cat > "${_TEMPDIR}"/"${_BUILD}".build << EOF
|
||||||
# live-webhelper "${VERSION}" build file
|
# live-helper.cgi "${VERSION}" build file
|
||||||
# `date -R`
|
# `date -R`
|
||||||
|
|
||||||
_BUILD="${_BUILD}"
|
_BUILD="${_BUILD}"
|
||||||
|
@ -216,8 +216,8 @@ _CUSTOM_BOOTSTRAP="${_CUSTOM_BOOTSTRAP}"
|
||||||
_CUSTOM_BINARY="${_CUSTOM_BINARY}"
|
_CUSTOM_BINARY="${_CUSTOM_BINARY}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-webhelper: add web build (${_BUILD})." >> /var/log/live
|
echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper.cgi: add web build (${_BUILD})." >> /var/log/live
|
||||||
echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-webhelper: options ${_BUILD} |email ${_EMAIL}|binary_images ${LH_BINARY_IMAGES}|distribution ${LH_DISTRIBUTION}|packages_lists ${LH_PACKAGES_LISTS}|packages ${LH_PACKAGES}|architecture ${LH_ARCHITECTURE}|mirror_bootstrap_security ${LH_MIRROR_BOOTSTRAP}|mirror_bootstrap ${LH_MIRROR_BOOTSTRAP}|mirror_binary_security ${LH_MIRROR_BINARY_SECURITY}|mirror_binary ${LH_MIRROR_BINARY}|sections ${LH_SECTIONS}|chroot_filesystem ${LH_CHROOT_FILESYSTEM}|linux_flavours ${LH_LINUX_FLAVOURS}|security ${LH_SECURITY}|symlinks ${LH_SYMLINKS}|sysvinit ${LH_SYSVINIT}|binary_indices ${LH_BINARY_INDICES}|bootappend ${LH_BOOTAPPEND}|bootloader ${LH_BOOTLOADER}|debian_installer ${LH_DEBIAN_INSTALLER}|encryption ${LH_ENCRYPTION}|hostname ${LH_HOSTNAME}|iso_application ${LH_ISO_APPLICATION}|iso_preparer ${LH_ISO_PREPARER}|iso_publisher ${LH_ISO_PUBLISHER}|iso_volume ${LH_ISO_VOLUME}|memtest ${LH_MEMTEST}|net_path ${LH_NET_ROOT_PATH}|net_server ${LH_NET_ROOT_SERVER}|username ${LH_USERNAME}|source_images ${LH_SOURCE_IMAGES}|source ${LH_SOURCE}|custom_bootstrap ${_CUSTOM_BOOTSTRAP}|custom_binary ${_CUSTOM_BINARY}\n" >> /var/log/live
|
echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper.cgi: options ${_BUILD} |email ${_EMAIL}|binary_images ${LH_BINARY_IMAGES}|distribution ${LH_DISTRIBUTION}|packages_lists ${LH_PACKAGES_LISTS}|packages ${LH_PACKAGES}|architecture ${LH_ARCHITECTURE}|mirror_bootstrap_security ${LH_MIRROR_BOOTSTRAP}|mirror_bootstrap ${LH_MIRROR_BOOTSTRAP}|mirror_binary_security ${LH_MIRROR_BINARY_SECURITY}|mirror_binary ${LH_MIRROR_BINARY}|sections ${LH_SECTIONS}|chroot_filesystem ${LH_CHROOT_FILESYSTEM}|linux_flavours ${LH_LINUX_FLAVOURS}|security ${LH_SECURITY}|symlinks ${LH_SYMLINKS}|sysvinit ${LH_SYSVINIT}|binary_indices ${LH_BINARY_INDICES}|bootappend ${LH_BOOTAPPEND}|bootloader ${LH_BOOTLOADER}|debian_installer ${LH_DEBIAN_INSTALLER}|encryption ${LH_ENCRYPTION}|hostname ${LH_HOSTNAME}|iso_application ${LH_ISO_APPLICATION}|iso_preparer ${LH_ISO_PREPARER}|iso_publisher ${LH_ISO_PUBLISHER}|iso_volume ${LH_ISO_VOLUME}|memtest ${LH_MEMTEST}|net_path ${LH_NET_ROOT_PATH}|net_server ${LH_NET_ROOT_SERVER}|username ${LH_USERNAME}|source_images ${LH_SOURCE_IMAGES}|source ${LH_SOURCE}|custom_bootstrap ${_CUSTOM_BOOTSTRAP}|custom_binary ${_CUSTOM_BINARY}\n" >> /var/log/live
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -e "s/VERSION/${VERSION}/" "${_TEMPLATES}"/footer.html
|
sed -e "s/VERSION/${VERSION}/" "${_TEMPLATES}"/footer.html
|
||||||
|
|
22
cgi/cron
22
cgi/cron
|
@ -11,11 +11,11 @@
|
||||||
. "${LH_BASE:-/usr/share/live-helper}"/live-helper.sh
|
. "${LH_BASE:-/usr/share/live-helper}"/live-helper.sh
|
||||||
|
|
||||||
# Reading defaults
|
# Reading defaults
|
||||||
if [ -r /etc/default/live-webhelper ]
|
if [ -r /etc/default/live-helper.cgi ]
|
||||||
then
|
then
|
||||||
. /etc/default/live-webhelper
|
. /etc/default/live-helper.cgi
|
||||||
else
|
else
|
||||||
echo "E: /etc/default/live-webhelper missing"
|
echo "E: /etc/default/live-helper.cgi missing"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -26,27 +26,27 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking lock file
|
# Checking lock file
|
||||||
if [ -f /var/lock/live-webhelper.lock ]
|
if [ -f /var/lock/live-helper.cgi.lock ]
|
||||||
then
|
then
|
||||||
echo "E: live-webhelper already/still running."
|
echo "E: live-helper.cgi already/still running."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Creating lock trap
|
# Creating lock trap
|
||||||
trap "test -f /var/lock/live-webhelper.lock && rm -f /var/lock/live-webhelper.lock; exit 0" 0 1 2 3 9 15
|
trap "test -f /var/lock/live-helper.cgi.lock && rm -f /var/lock/live-helper.cgi.lock; exit 0" 0 1 2 3 9 15
|
||||||
|
|
||||||
# Creating lock file
|
# Creating lock file
|
||||||
touch /var/lock/live-webhelper.lock
|
touch /var/lock/live-helper.cgi.lock
|
||||||
|
|
||||||
# Cleanup old builds: cron should be run at least once per hour to take effect
|
# Cleanup old builds: cron should be run at least once per hour to take effect
|
||||||
if ls "${_DESTDIR}"/`date -d yesterday +%Y%m%d.%H`* > /dev/null 2>&1
|
if ls "${_DESTDIR}"/`date -d yesterday +%Y%m%d.%H`* > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
rm -rf "${_DESTDIR}"/`date -d yesterday +%Y%m%d.%H`*
|
rm -rf "${_DESTDIR}"/`date -d yesterday +%Y%m%d.%H`*
|
||||||
|
|
||||||
echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: remove web build (`date -d yesterday +%Y%m%d.%H`*)." >> /var/log/live
|
echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper.cgi: remove web build (`date -d yesterday +%Y%m%d.%H`*)." >> /var/log/live
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ok from here spin through the live-webhelper files we have waiting to build
|
# Ok from here spin through the live-helper.cgi files we have waiting to build
|
||||||
#if ls "${_TEMPDIR}"/*.build > /dev/null 2>&1
|
#if ls "${_TEMPDIR}"/*.build > /dev/null 2>&1
|
||||||
if Find_files ${_TEMPDIR}/*.build
|
if Find_files ${_TEMPDIR}/*.build
|
||||||
then
|
then
|
||||||
|
@ -63,7 +63,7 @@ then
|
||||||
_CUSTOM_BINARY=`awk -F\" '/^_CUSTOM_BINARY=/{print $2}' ${_FILE}`
|
_CUSTOM_BINARY=`awk -F\" '/^_CUSTOM_BINARY=/{print $2}' ${_FILE}`
|
||||||
|
|
||||||
# Drop out some build data for information if something goes wrong.
|
# Drop out some build data for information if something goes wrong.
|
||||||
echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: begin web build (${_BUILD})." >> /var/log/live
|
echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper.cgi: begin web build (${_BUILD})." >> /var/log/live
|
||||||
|
|
||||||
# Creating build directory which also creates the config/chroot_sources folder
|
# Creating build directory which also creates the config/chroot_sources folder
|
||||||
mkdir -p "${_TEMPDIR}"/"${_BUILD}"/config/chroot_sources
|
mkdir -p "${_TEMPDIR}"/"${_BUILD}"/config/chroot_sources
|
||||||
|
@ -162,6 +162,6 @@ then
|
||||||
# Removing build directory
|
# Removing build directory
|
||||||
rm -rf "${_TEMPDIR}"/"${_BUILD}"
|
rm -rf "${_TEMPDIR}"/"${_BUILD}"
|
||||||
|
|
||||||
echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: end web build (${_BUILD}: ${_STATUS})." >> /var/log/live
|
echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper.cgi: end web build (${_BUILD}: ${_STATUS})." >> /var/log/live
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
10
cgi/default
10
cgi/default
|
@ -1,4 +1,4 @@
|
||||||
# Defaults for /etc/cron.daily/live-webhelper
|
# Defaults for /etc/cron.daily/live-helper.cgi
|
||||||
|
|
||||||
_WEBBUILD="disabled"
|
_WEBBUILD="disabled"
|
||||||
|
|
||||||
|
@ -6,13 +6,13 @@ _MODE="debian-official"
|
||||||
|
|
||||||
_DEBUG="disabled"
|
_DEBUG="disabled"
|
||||||
|
|
||||||
_DESTDIR="/srv/debian-live/www/webhelper"
|
_DESTDIR="/srv/debian-live/build/www"
|
||||||
_TEMPLATES="/usr/share/live-webhelper/templates/${_MODE}"
|
_TEMPLATES="/usr/share/live-helper/templates/cgi/${_MODE}"
|
||||||
_TEMPDIR="/srv/tmp/live-webhelper"
|
_TEMPDIR="/srv/debian-live/build/tmp"
|
||||||
|
|
||||||
LH_MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/"
|
LH_MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/"
|
||||||
LH_MIRROR_BOOTSTRAP_SECURITY="http://ftp.de.debian.org/debian-security/"
|
LH_MIRROR_BOOTSTRAP_SECURITY="http://ftp.de.debian.org/debian-security/"
|
||||||
LH_MIRROR_BINARY="http://ftp.debian.org/debian/"
|
LH_MIRROR_BINARY="http://ftp.debian.org/debian/"
|
||||||
LH_MIRROR_BINARY_SECURITY="http://security.debian.org/"
|
LH_MIRROR_BINARY_SECURITY="http://security.debian.org/"
|
||||||
|
|
||||||
_SERVER="http://live.debian.net/webhelper"
|
_SERVER="http://live.debian.net/build"
|
||||||
|
|
Loading…
Reference in New Issue