Reconfiguring radicale

This commit is contained in:
Bob Mottram 2016-11-17 10:47:20 +00:00
parent 316fe5800d
commit 2dd7a73452
1 changed files with 15 additions and 1 deletions

View File

@ -105,7 +105,21 @@ function install_interactive_radicale {
}
function reconfigure_radicale {
echo -n ''
rm $RADICALE_USERS
rm -rf /var/www/radicale/collections/*
rm -rf /var/log/radicale/*
# create an admin password
if [ -f $IMAGE_PASSWORD_FILE ]; then
RADICALE_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
else
RADICALE_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
fi
add_user_radicale "$MY_USERNAME" "$RADICALE_PASSWORD"
sed -i "s|Your Radicale password is.*|Your Radicale password is: ${RADICALE_PASSWORD}|g" /home/$MY_USERNAME/README
touch /var/log/radicale/radicale.log
chown -R www-data:www-data /var/log/radicale
}
function upgrade_radicale {