diff --git a/vendor/sunnyvalley/+POST_DEINSTALL b/vendor/sunnyvalley/+POST_DEINSTALL new file mode 100644 index 000000000..4729ff761 --- /dev/null +++ b/vendor/sunnyvalley/+POST_DEINSTALL @@ -0,0 +1,3 @@ + +rm -f /usr/local/etc/pkg/repos/SunnyValley.conf + diff --git a/vendor/sunnyvalley/+POST_INSTALL b/vendor/sunnyvalley/+POST_INSTALL new file mode 100644 index 000000000..de4c43fef --- /dev/null +++ b/vendor/sunnyvalley/+POST_INSTALL @@ -0,0 +1,16 @@ + +OPNSENSE_FLAVOR=$(/usr/local/sbin/opnsense-version -f) + +if [ "${OPNSENSE_FLAVOR}" == "OpenSSL" ]; then + echo "Configuring repository for OpenSSL flavor" +elif [ "${OPNSENSE_FLAVOR}" == "LibreSSL" ]; then + echo "Configuring repository for LibreSSL flavor" +else + echo "Unsupported OPNsense flavor, aborting" + exit 1 +fi + +cat /usr/local/etc/pkg/repos/SunnyValley.conf.shadow.in | sed "s/%%FLAVOR%%/${OPNSENSE_FLAVOR}/g" > /usr/local/etc/pkg/repos/SunnyValley.conf + + + diff --git a/vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf b/vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf.shadow.in similarity index 59% rename from vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf rename to vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf.shadow.in index a0ca0af1f..448247ca8 100644 --- a/vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf +++ b/vendor/sunnyvalley/src/etc/pkg/repos/SunnyValley.conf.shadow.in @@ -1,7 +1,7 @@ SunnyValley: { fingerprints: "/usr/local/etc/pkg/fingerprints/SunnyValley", - url: "https://updates.sunnyvalley.io/opnsense/repo/", + url: "https://updates.sunnyvalley.io/opnsense/${ABI}/%%FLAVOR%%/repo", signature_type: "fingerprints", - priority: 101, + priority: 7, enabled: yes }