fix installer bugs

This commit is contained in:
KiekerJan 2022-02-01 23:14:26 +01:00
parent d017c8b04c
commit 72b08d6b9a
3 changed files with 5 additions and 13 deletions

View File

@ -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

View File

@ -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.

View File

@ -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