diff --git a/src/freedombone-app-radicale b/src/freedombone-app-radicale index 572c7edb..1ac499a7 100755 --- a/src/freedombone-app-radicale +++ b/src/freedombone-app-radicale @@ -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 {