summaryrefslogtreecommitdiffstats
path: root/main/acf-core
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2010-01-27 14:24:30 +0000
committerTed Trask <ttrask01@yahoo.com>2010-01-27 14:24:30 +0000
commitdb5843ca6f02033ab0b2b7cf46ee8f6d5ced92fc (patch)
tree5f06a788b9652b54853e01d3da0f11b2e36c388d /main/acf-core
parent99c131bece30316203e857ba0eaef64e99b03a9d (diff)
downloadaports-db5843ca6f02033ab0b2b7cf46ee8f6d5ced92fc.tar.bz2
aports-db5843ca6f02033ab0b2b7cf46ee8f6d5ced92fc.tar.xz
main/acf-core: Added post-upgrade to use new acf.conf.
Diffstat (limited to 'main/acf-core')
-rw-r--r--main/acf-core/APKBUILD1
-rw-r--r--main/acf-core/acf-core.post-upgrade16
2 files changed, 17 insertions, 0 deletions
diff --git a/main/acf-core/APKBUILD b/main/acf-core/APKBUILD
index 68721739..ea51c698 100644
--- a/main/acf-core/APKBUILD
+++ b/main/acf-core/APKBUILD
@@ -5,6 +5,7 @@ pkgrel=0
pkgdesc="A web-based system administration interface framework"
url="http://git.alpinelinux.org/cgit/acf-core"
license="GPL-2"
+install="$pkgname.post-upgrade"
depends="acf-jquery acf-lib acf-skins haserl lua lua-posix lua-md5"
source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2"
diff --git a/main/acf-core/acf-core.post-upgrade b/main/acf-core/acf-core.post-upgrade
new file mode 100644
index 00000000..1a54c045
--- /dev/null
+++ b/main/acf-core/acf-core.post-upgrade
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+new=$1
+old=$2
+
+# if current is not older than 0.10.1 we exit.
+if ! [ "$(apk version -t $old 0.10.1)" = "<" ]; then
+ exit 0
+fi
+
+if [ -e /etc/acf/acf.conf.apk-new ]; then
+ mv /etc/acf/acf.conf /etc/acf/acf.conf.apk-old
+ mv /etc/acf/acf.conf.apk-new /etc/acf/acf.conf
+fi
+
+exit 0