replace '1' with '0', as 0 stands for true in sh.

This commit is contained in:
dkoao 2019-09-26 10:00:12 +00:00
parent 857ccaa06c
commit e41cfc30b8
6 changed files with 9 additions and 9 deletions

View File

@ -281,7 +281,7 @@ def build_zone(domain, all_domains, additional_records, www_redirect_domains, en
if not has_rec(dmarc_qname, "TXT", prefix="v=DMARC1; "):
records.append((dmarc_qname, "TXT", 'v=DMARC1; p=reject', "Recommended. Prevents use of this domain name for outbound mail by specifying that the SPF rule should be honoured for mail from @%s." % (qname + "." + domain)))
if environ.get('DISABLE_NEXTCLOUD') != '1':
if environ.get('DISABLE_NEXTCLOUD') != '0':
# Add CardDAV/CalDAV SRV records on the non-primary hostname that points to the primary hostname.
# The SRV record format is priority (0, whatever), weight (0, whatever), port, service provider hostname (w/ trailing dot).
if domain != env["PRIMARY_HOSTNAME"]:

View File

@ -79,7 +79,7 @@ def do_web_update(env):
template0 = open(os.path.join(os.path.dirname(__file__), "../conf/nginx.conf")).read()
template1 = open(os.path.join(os.path.dirname(__file__), "../conf/nginx-alldomains.conf")).read()
# Check if the user doesn't want Nextcloud.
if environ.get('DISABLE_NEXTCLOUD') == '1':
if environ.get('DISABLE_NEXTCLOUD') == '0':
template2 = open(os.path.join(os.path.dirname(__file__), "../conf/nginx-primaryonly-no-nextcloud.conf")).read()
else:
template2 = open(os.path.join(os.path.dirname(__file__), "../conf/nginx-primaryonly.conf")).read()

View File

@ -107,7 +107,7 @@ source setup/spamassassin.sh
source setup/web.sh
source setup/webmail.sh
if [ "${DISABLE_NEXTCLOUD}" == "1" ]; then
if [ "${DISABLE_NEXTCLOUD}" == "0" ]; then
echo Skipping Nextcloud installation
else
source setup/nextcloud.sh

View File

@ -343,7 +343,7 @@ rm -f /etc/fail2ban/jail.d/defaults-debian.conf # removes default config so we c
# Check if the user wants to enable Nextcloud, if the user wants it
# the relevant firejail configuration will be added
if [ ${DISABLE_NEXTCLOUD} != "1"]; then
if [ ${DISABLE_NEXTCLOUD} != "0"]; then
cat conf/fail2ban/nextcloud-jail.conf >> conf/fail2ban/jails.conf
fi

View File

@ -69,7 +69,7 @@ if [ $needs_update == 1 ]; then
# download and verify the full release of the carddav plugin
if [ "${DISABLE_NEXTCLOUD}" != "1" ]; then
if [ "${DISABLE_NEXTCLOUD}" != "0" ]; then
wget_verify \
https://github.com/blind-coder/rcmcarddav/releases/download/v${CARDDAV_VERSION}/carddav-${CARDDAV_VERSION}.zip \
$CARDDAV_HASH \
@ -127,7 +127,7 @@ cat > $RCM_CONFIG <<EOF;
\$config['des_key'] = '$SECRET_KEY';
EOF
if [ "${DISABLE_NEXTCLOUD}" == "1" ]; then
if [ "${DISABLE_NEXTCLOUD}" == "0" ]; then
cat >> $RCM_CONFIG <<EOF;
\$config['plugins'] = array('html5_notifier', 'archive', 'zipdownload', 'password', 'managesieve', 'jqueryui', 'persistent_login');
\$config['skin'] = 'larry';
@ -149,7 +149,7 @@ fi
# Configure CardDav
if [ "${DISABLE_NEXTCLOUD}" != "1" ]; then
if [ "${DISABLE_NEXTCLOUD}" != "0" ]; then
cat > ${RCM_PLUGIN_DIR}/carddav/config.inc.php <<EOF;
<?php
@ -203,7 +203,7 @@ chmod 775 $STORAGE_ROOT/mail
chown root.www-data $STORAGE_ROOT/mail/users.sqlite
chmod 664 $STORAGE_ROOT/mail/users.sqlite
if [ "${DISABLE_NEXTCLOUD}" != "1" ]; then
if [ "${DISABLE_NEXTCLOUD}" != "0" ]; then
# Fix Carddav permissions:
chown -f -R root.www-data ${RCM_PLUGIN_DIR}/carddav
# root.www-data need all permissions, others only read

View File

@ -64,7 +64,7 @@ rm -f /usr/local/lib/z-push/backend/imap/config.php
cp conf/zpush/backend_imap.php /usr/local/lib/z-push/backend/imap/config.php
sed -i "s%STORAGE_ROOT%$STORAGE_ROOT%" /usr/local/lib/z-push/backend/imap/config.php
if [ "${DISABLE_NEXTCLOUD}" != "1" ]; then
if [ "${DISABLE_NEXTCLOUD}" != "0" ]; then
# Configure CardDav
rm -f /usr/local/lib/z-push/backend/carddav/config.php