]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
core114: force update addons after core update
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 23 Sep 2017 08:34:54 +0000 (10:34 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 23 Sep 2017 08:34:54 +0000 (10:34 +0200)
apache needs new vhost configs so all addons must updated to work with new
apache.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/core/114/update.sh

index 6d7a10b5ed00f73780da338cd974ca78c5ee7253..ac59cc9c677bab547378fd78f1680c22bb09e3d2 100644 (file)
@@ -69,6 +69,27 @@ if grep -q "ENABLED=on" /var/ipfire/vpn/settings; then
        ipsec start
 fi
 
+#
+# After pakfire has ended run it again and update all addons
+# this is needed for apache update.
+#
+echo '#!/bin/bash'                                        >  /tmp/pak_update
+echo 'while [ "$(ps -A | grep " update.sh")" != "" ]; do' >> /tmp/pak_update
+echo '    sleep 1'                                        >> /tmp/pak_update
+echo 'done'                                               >> /tmp/pak_update
+echo 'while [ "$(ps -A | grep " pakfire")" != "" ]; do'   >> /tmp/pak_update
+echo '    sleep 1'                                        >> /tmp/pak_update
+echo 'done'                                               >> /tmp/pak_update
+echo '/opt/pakfire/pakfire update -y --force'             >> /tmp/pak_update
+echo '/opt/pakfire/pakfire upgrade -y'                    >> /tmp/pak_update
+echo '/opt/pakfire/pakfire upgrade -y'                    >> /tmp/pak_update
+echo '/opt/pakfire/pakfire upgrade -y'                    >> /tmp/pak_update
+echo 'touch /var/run/need_reboot ' >> /tmp/pak_update
+#
+killall -KILL pak_update
+chmod +x /tmp/pak_update
+/tmp/pak_update &
+
 # This update need a reboot...
 touch /var/run/need_reboot