add further checks

This commit is contained in:
dkoao 2019-09-26 03:02:35 +00:00
parent 27b3e8f1a1
commit 81d7fdb63f
1 changed files with 40 additions and 20 deletions

View File

@ -68,6 +68,8 @@ if [ $needs_update == 1 ]; then
git_clone https://github.com/kitist/html5_notifier.git $HTML5_NOTIFIER_VERSION '' ${RCM_PLUGIN_DIR}/html5_notifier git_clone https://github.com/kitist/html5_notifier.git $HTML5_NOTIFIER_VERSION '' ${RCM_PLUGIN_DIR}/html5_notifier
# download and verify the full release of the carddav plugin # download and verify the full release of the carddav plugin
if [ "${DISABLE_NEXTCLOUD}" != "1" ]; then
wget_verify \ wget_verify \
https://github.com/blind-coder/rcmcarddav/releases/download/v${CARDDAV_VERSION}/carddav-${CARDDAV_VERSION}.zip \ https://github.com/blind-coder/rcmcarddav/releases/download/v${CARDDAV_VERSION}/carddav-${CARDDAV_VERSION}.zip \
$CARDDAV_HASH \ $CARDDAV_HASH \
@ -80,6 +82,7 @@ if [ $needs_update == 1 ]; then
# record the version we've installed # record the version we've installed
echo $UPDATE_KEY > ${RCM_DIR}/version echo $UPDATE_KEY > ${RCM_DIR}/version
fi fi
fi
# ### Configuring Roundcube # ### Configuring Roundcube
@ -122,6 +125,19 @@ cat > $RCM_CONFIG <<EOF;
\$config['support_url'] = 'https://mailinabox.email/'; \$config['support_url'] = 'https://mailinabox.email/';
\$config['product_name'] = '$PRIMARY_HOSTNAME Webmail'; \$config['product_name'] = '$PRIMARY_HOSTNAME Webmail';
\$config['des_key'] = '$SECRET_KEY'; \$config['des_key'] = '$SECRET_KEY';
EOF
if [ "${DISABLE_NEXTCLOUD}" != "1" ]; then
cat >> $RCM_CONFIG <<EOF;
\$config['plugins'] = array('html5_notifier', 'archive', 'zipdownload', 'password', 'managesieve', 'jqueryui', 'persistent_login');
\$config['skin'] = 'larry';
\$config['login_autocomplete'] = 2;
\$config['password_charset'] = 'UTF-8';
\$config['junk_mbox'] = 'Spam';
?>
EOF
else
cat >> $RCM_CONFIG <<EOF;
\$config['plugins'] = array('html5_notifier', 'archive', 'zipdownload', 'password', 'managesieve', 'jqueryui', 'persistent_login', 'carddav'); \$config['plugins'] = array('html5_notifier', 'archive', 'zipdownload', 'password', 'managesieve', 'jqueryui', 'persistent_login', 'carddav');
\$config['skin'] = 'larry'; \$config['skin'] = 'larry';
\$config['login_autocomplete'] = 2; \$config['login_autocomplete'] = 2;
@ -129,6 +145,8 @@ cat > $RCM_CONFIG <<EOF;
\$config['junk_mbox'] = 'Spam'; \$config['junk_mbox'] = 'Spam';
?> ?>
EOF EOF
fi
# Configure CardDav # Configure CardDav
if [ "${DISABLE_NEXTCLOUD}" != "1" ]; then if [ "${DISABLE_NEXTCLOUD}" != "1" ]; then
@ -185,10 +203,12 @@ chmod 775 $STORAGE_ROOT/mail
chown root.www-data $STORAGE_ROOT/mail/users.sqlite chown root.www-data $STORAGE_ROOT/mail/users.sqlite
chmod 664 $STORAGE_ROOT/mail/users.sqlite chmod 664 $STORAGE_ROOT/mail/users.sqlite
if [ "${DISABLE_NEXTCLOUD}" != "1" ]; then
# Fix Carddav permissions: # Fix Carddav permissions:
chown -f -R root.www-data ${RCM_PLUGIN_DIR}/carddav chown -f -R root.www-data ${RCM_PLUGIN_DIR}/carddav
# root.www-data need all permissions, others only read # root.www-data need all permissions, others only read
chmod -R 774 ${RCM_PLUGIN_DIR}/carddav chmod -R 774 ${RCM_PLUGIN_DIR}/carddav
fi
# Run Roundcube database migration script (database is created if it does not exist) # Run Roundcube database migration script (database is created if it does not exist)
${RCM_DIR}/bin/updatedb.sh --dir ${RCM_DIR}/SQL --package roundcube ${RCM_DIR}/bin/updatedb.sh --dir ${RCM_DIR}/SQL --package roundcube