mirror of
https://git.freebsd.org/ports.git
synced 2025-06-07 13:50:38 -04:00
Update automx-test patch Fetch upstream files from github Add missing dependencies Remove apache as a dependency (allows other web servers to be used) Add py-memcahced as an optional dependency Add INSTALL and BASIC_CONFIGURATION_README to docs Change the post install message to direct to the INSTALL file rather than dumping it to the console PR: ports/188630 Submitted by: Andrew Fyfe <andrew@neptune-one.net>
74 lines
2.2 KiB
Text
74 lines
2.2 KiB
Text
--- src/automx-test.orig 2014-01-03 08:38:38.000000000 +0000
|
|
+++ src/automx-test 2014-04-14 22:20:41.000000000 +0100
|
|
@@ -1,4 +1,4 @@
|
|
-#!/bin/bash
|
|
+#!/bin/sh
|
|
#
|
|
# automx - auto configuration service
|
|
# Copyright (c) 2011-2013 [*] sys4 AG
|
|
@@ -19,17 +19,19 @@
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
#
|
|
+# Ported to sh to avoid a dependency on bash by crees@FreeBSD.org
|
|
+#
|
|
VERSION="0.10.1"
|
|
|
|
trap clean_exit EXIT
|
|
-function clean_exit() {
|
|
- [[ -f "$OLREQUEST" ]] && rm "$OLREQUEST"
|
|
- [[ -f "$MBREQUEST" ]] && rm "$MBREQUEST"
|
|
- [[ -f "$MBCRESPONSE" ]] && rm "$MBCRESPONSE"
|
|
+clean_exit() {
|
|
+ [ -f "$OLREQUEST" ] && rm "$OLREQUEST"
|
|
+ [ -f "$MBREQUEST" ] && rm "$MBREQUEST"
|
|
+ [ -f "$MBCRESPONSE" ] && rm "$MBCRESPONSE"
|
|
}
|
|
|
|
# We need a mail address
|
|
-if [[ $1 ]]; then
|
|
+if [ -n "$1" ]; then
|
|
PROFILE="$1"
|
|
else
|
|
echo "Provide the mail address for which configuration settings should be retrieved."
|
|
@@ -44,7 +46,7 @@
|
|
|
|
# Test Mozilla schema
|
|
AUTOCONF="autoconfig.$DOMAIN"
|
|
-if [[ $(dig +short $AUTOCONF) ]]; then
|
|
+if [ -n "$(dig +short $AUTOCONF)" ]; then
|
|
CON="http://$AUTOCONF/mail/config-v1.1.xml?emailaddress=$PROFILE"
|
|
echo
|
|
echo "Testing Autoconfig ..."
|
|
@@ -60,13 +62,13 @@
|
|
|
|
# Test Microsoft schema
|
|
AUTODISC="autodiscover.$DOMAIN"
|
|
-if [[ -z $(dig +short $AUTODISC) ]]; then
|
|
+if [ -z "$(dig +short $AUTODISC)" ]; then
|
|
# default domain does not exist, try to discover non-default
|
|
AUTODISC="$(dig +short -t srv _autodiscover._tcp.$DOMAIN)"
|
|
AUTODISC="${AUTODISC//* /}"
|
|
AUTODISC="${AUTODISC%.*}"
|
|
fi
|
|
-if [[ $AUTODISC ]]; then
|
|
+if [ -n "$AUTODISC" ]; then
|
|
# Test Microsoft Outlook schema
|
|
CON="https://$AUTODISC/autodiscover/autodiscover.xml"
|
|
cat <<-REQ >$OLREQUEST
|
|
@@ -111,13 +113,13 @@
|
|
|
|
# Test mobileconfig schema
|
|
AUTODISC="autodiscover.$DOMAIN"
|
|
-if [[ -z $(dig +short $AUTODISC) ]]; then
|
|
+if [ -z "$(dig +short $AUTODISC)" ]; then
|
|
# default domain does not exist, try to discover non-default
|
|
AUTODISC="$(dig +short -t srv _autodiscover._tcp.$DOMAIN)"
|
|
AUTODISC="${AUTODISC//* /}"
|
|
AUTODISC="${AUTODISC%.*}"
|
|
fi
|
|
-if [[ $AUTODISC ]]; then
|
|
+if [ -n "$AUTODISC" ]; then
|
|
# Test Apple mobileconfig schema
|
|
CON="https://$AUTODISC/mobileconfig"
|
|
|