summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader/updater.template.sh
diff options
context:
space:
mode:
authorSimon Rettberg2017-05-03 14:10:17 +0200
committerSimon Rettberg2017-05-03 14:10:17 +0200
commit561fb2c27c040755ab1590355ec2512fbc5119ac (patch)
tree254dec3027792ec5de32ab2a8770feda7ad475c4 /satellit_upgrader/updater.template.sh
parent[SSUS] Write CONFIG_REPORTING_URL to config.php (diff)
downloadsetup-scripts-561fb2c27c040755ab1590355ec2512fbc5119ac.tar.gz
setup-scripts-561fb2c27c040755ab1590355ec2512fbc5119ac.tar.xz
setup-scripts-561fb2c27c040755ab1590355ec2512fbc5119ac.zip
[SSUS/SSPS] Properly install/update autossl and include-conf.d for lighttpd
Diffstat (limited to 'satellit_upgrader/updater.template.sh')
-rw-r--r--satellit_upgrader/updater.template.sh21
1 files changed, 18 insertions, 3 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index 4b2da57..d52637c 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -108,7 +108,7 @@ fi
# Get current webif version
if [ -n "$TGZ_SLXADMIN" ]; then
- declare -rg CURRENT_WEBIF_VERSION=$(mysql -e 'SELECT value FROM openslx.property WHERE name = "webif-version" LIMIT 1' | tail -n 1)
+ declare -rg CURRENT_WEBIF_VERSION=$(cat "${PATH_SLXADMIN}/version" | tail -n 1)
if [ -z "$CURRENT_WEBIF_VERSION" ] || [ "$TARGET_WEBIF_VERSION" = "missing" ] || [ "$CURRENT_WEBIF_VERSION" -le "$TARGET_WEBIF_VERSION" ]; then
: # Negate so NaN triggers else branch
else
@@ -202,14 +202,13 @@ if [ -n "$TGZ_SLXADMIN" ]; then
FOOTER="$OLDFOOTER [Update: ${FOOTER}]"
sed -i "s#^.*define.*CONFIG_FOOTER.*\$#define('CONFIG_FOOTER', '${FOOTER}');#" "${PATH_SLXADMIN}/config.php"
grep -q 'CONFIG_FOOTER' "${PATH_SLXADMIN}/config.php" || echo "define('CONFIG_FOOTER', '${FOOTER}');" >> "${PATH_SLXADMIN}/config.php"
- grep -q 'CONFIG_REPORTING_URL' "${PATH_SLXADMIN}/config.php" || echo "define('CONFIG_REPORTING_URL', 'https://bwlp-masterserver.ruf.uni-freiburg.de/rpc/');" >> "${PATH_SLXADMIN}/config.php"
echo "$TARGET_WEBIF_VERSION" > "${PATH_SLXADMIN}/version"
fi
# Enable modules
(
mkdir -p "$PATH_SLXADMIN/modules"
cd "$PATH_SLXADMIN/modules" || perror "Cannot cd to slxadmin"
- for mod in adduser backup baseconfig baseconfig_bwidm baseconfig_bwlp bootstrap_datepicker bootstrap_dialog bootstrap_timepicker bootstrap_multiselect bootstrap_switch dozmod eventlog exams js_chart js_circles js_jqueryui js_moment js_selectize js_vis locations main minilinux news serversetup-bwlp roomplanner session statistics summernote sysconfig syslog systemstatus vmstore webinterface; do
+ for mod in adduser backup baseconfig baseconfig_bwidm baseconfig_bwlp bootstrap_datepicker bootstrap_dialog bootstrap_timepicker bootstrap_multiselect bootstrap_switch dozmod eventlog exams js_chart js_circles js_jqueryui js_moment js_selectize js_stupidtable js_vis locationinfo locations main minilinux news serversetup-bwlp rebootcontrol roomplanner session statistics statistics_reporting summernote sysconfig syslog systemstatus vmstore webinterface; do
name=${mod%%-*}
rm -f -- "$name"
ln -s "../modules-available/$mod" "$name" || pwarning "Could not activate module '$mod' (alias '$name')"
@@ -298,6 +297,22 @@ if [ -e "$FILEDIR/lighttpd.conf" ] && [ -e "/etc/lighttpd/lighttpd.conf" ]; then
echo "lighttpd config upgrade complete"
fi
+# ********************** lighttpd auto ssl *******************
+if [ -e "$FILEDIR/lighttpd-auto-ssl.sh" ] && [ -d "/usr/share/lighttpd" ]; then
+ echo "* Replacing lighttpd auto-ssl.sh"
+ cp "$FILEDIR/lighttpd-auto-ssl.sh" "/usr/share/lighttpd/auto-ssl.sh" || perror "Could not replace /usr/share/lighttpd/auto-ssl.sh"
+ RESTART_LIGHTY=ja
+ echo "lighttpd auto-ssl.sh upgrade complete"
+fi
+
+# ********************** lighttpd-include-conf-d.sh *******************
+if [ -e "$FILEDIR/lighttpd-include-conf-d.sh" ] && [ -d "/usr/share/lighttpd" ]; then
+ echo "* Replacing lighttpd include-conf-d.sh"
+ cp "$FILEDIR/lighttpd-include-conf-d.sh" "/usr/share/lighttpd/include-conf-d.sh" || perror "Could not replace /usr/share/lighttpd/include-conf-d.sh"
+ RESTART_LIGHTY=ja
+ echo "lighttpd include-conf-d.sh upgrade complete"
+fi
+
# ********************** lighttpd php_children *************
if [ -e "$FILEDIR/patch_lighttpd_phpchildren" ]; then
echo "* lighttpd: dynamic php children value"