From 72b08d6b9ad8cc09fcc7392c91d5f3a0fa106578 Mon Sep 17 00:00:00 2001 From: KiekerJan Date: Tue, 1 Feb 2022 23:14:26 +0100 Subject: [PATCH] fix installer bugs --- management/dns_update.py | 2 +- setup/dkim.sh | 4 ++-- setup/nextcloud.sh | 12 ++---------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/management/dns_update.py b/management/dns_update.py index e009392a..1c4e6647 100755 --- a/management/dns_update.py +++ b/management/dns_update.py @@ -833,7 +833,7 @@ def write_dkim_tables(domains, env): dkim_rsa_key_file = os.path.join(env['STORAGE_ROOT'], 'mail/dkim/box-rsa.key') dkim_ed_key_file = os.path.join(env['STORAGE_ROOT'], 'mail/dkim/box-ed25519.key') - if not os.path.exists(dkim_rsa_key_file) || not os.path.exists(dkim_ed_key_file): + if not os.path.exists(dkim_rsa_key_file) or not os.path.exists(dkim_ed_key_file): # Looks like DKIMpy is not installed. return False diff --git a/setup/dkim.sh b/setup/dkim.sh index ee3efa8a..4235841d 100755 --- a/setup/dkim.sh +++ b/setup/dkim.sh @@ -51,9 +51,9 @@ if [ ! -f "$STORAGE_ROOT/mail/dkim/box-rsa.key" ]; then # Force them into the format dns_update.py expects sed -i 's/v=DKIM1;/box-rsa._domainkey IN TXT ( "v=DKIM1; s=email;/' $STORAGE_ROOT/mail/dkim/box-rsa.dns - echo '" )' >> box-rsa.dns + echo '" )' >> $STORAGE_ROOT/mail/dkim/box-rsa.dns sed -i 's/v=DKIM1;/box-ed25519._domainkey IN TXT ( "v=DKIM1; s=email;/' $STORAGE_ROOT/mail/dkim/box-ed25519.dns - echo '" )' >> box-ed25519.dns + echo '" )' >> $STORAGE_ROOT/mail/dkim/box-ed25519.dns fi # Ensure files are owned by the dkimpy-milter user and are private otherwise. diff --git a/setup/nextcloud.sh b/setup/nextcloud.sh index ff7175cb..b0637c12 100755 --- a/setup/nextcloud.sh +++ b/setup/nextcloud.sh @@ -347,19 +347,11 @@ sudo -u www-data \ | (grep -v "No such app enabled" || /bin/true) # Install interesting apps -installed=$(sudo -u www-data php /usr/local/lib/owncloud/occ app:list | grep "notes") - -#if [ -z "$installed" ]; then - sudo -u www-data php /usr/local/lib/owncloud/occ app:install notes -#fi +(sudo -u www-data php /usr/local/lib/owncloud/occ app:install notes) || true hide_output sudo -u www-data php /usr/local/lib/owncloud/console.php app:enable notes -installed=$(sudo -u www-data php /usr/local/lib/owncloud/occ app:list | grep 'twofactor_totp') - -#if [ -z "$installed" ]; then - sudo -u www-data php /usr/local/lib/owncloud/occ app:install twofactor_totp -#fi +(sudo -u www-data php /usr/local/lib/owncloud/occ app:install twofactor_totp) || true hide_output sudo -u www-data php /usr/local/lib/owncloud/console.php app:enable twofactor_totp