summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader
diff options
context:
space:
mode:
authorSimon Rettberg2018-02-01 11:13:52 +0100
committerSimon Rettberg2018-02-01 11:13:52 +0100
commitc5c9a9343a90d32966fb235e0fe4d0fc0df707cd (patch)
tree91d22f70abeeed3935bedb1357db2cf336ea5971 /satellit_upgrader
parent[SSUS] Extract cert from cert-key combo .pem (diff)
downloadsetup-scripts-c5c9a9343a90d32966fb235e0fe4d0fc0df707cd.tar.gz
setup-scripts-c5c9a9343a90d32966fb235e0fe4d0fc0df707cd.tar.xz
setup-scripts-c5c9a9343a90d32966fb235e0fe4d0fc0df707cd.zip
[SSUS] Allow updating atftpd via .deb
Diffstat (limited to 'satellit_upgrader')
-rw-r--r--satellit_upgrader/updater.template.sh21
1 files changed, 15 insertions, 6 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index d58d850..58d3368 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -14,16 +14,16 @@ if [ "$(lsb_release -si)" != "Debian" ]; then
exit 1
fi
-TEST2=$(lsb_release -sr)
-if [ "${TEST2%%.*}" -lt 8 ]; then
+MAJOR=$(lsb_release -sr)
+MAJOR=${MAJOR%%.*}
+if [ "${MAJOR}" -lt 8 ]; then
echo "This Version of the bwLehrpool Satellite Server is too old!"
exit 1
fi
-if [ "${TEST2%%.*}" -gt 8 ]; then
+if [ "${MAJOR}" -gt 8 ]; then
echo "This Version of the bwLehrpool Satellite Server is too new!"
exit 1
fi
-unset TEST2
unset TMPDIR
[ -n "$TMPDIR" ] && exit 1
@@ -423,14 +423,23 @@ if ! grep -q -E '^\s*post_max_size = 100M' "$PHPINIFILE"; then
RESTART_LIGHTY=ja
fi
+# ******************* atftpd update ************************
+echo "* Updating atftpd"
+if [ "$MAJOR" = 8 ] && [ -s "$FILEDIR/atftpd32.deb" ] && [ "$(uname -m)" == "i686" ]; then
+ echo "Updating package"
+ if ! dpkg -i "$FILEDIR/atftpd32.deb" > "$TMPDIR/apt.log" 2>&1; then
+ cat "$TMPDIR/apt.log"
+ pwarning "Could not update atftpd."
+ fi
+fi
+
# ********************** atftpd.service ********************
if [ -e "$FILEDIR/atftpd.service" ]; then
- echo "* Replacing atftpd.service"
+ echo "Replacing atftpd.service"
cp "$FILEDIR/atftpd.service" "/etc/systemd/system/atftpd.service" || perror "Could not replace /etc/systemd/system/atftpd.service"
ln -s -f "../atftpd.service" "/etc/systemd/system/multi-user.target.wants/"
systemctl daemon-reload
restart_service atftpd
- echo "Service file replaced"
fi
# ********************** dmsd.service **********************