Selaa lähdekoodia

Reconfiguring radicale

Bob Mottram 8 vuotta sitten
vanhempi
commit
2dd7a73452
1 muutettua tiedostoa jossa 15 lisäystä ja 1 poistoa
  1. 15
    1
      src/freedombone-app-radicale

+ 15
- 1
src/freedombone-app-radicale Näytä tiedosto

@@ -105,7 +105,21 @@ function install_interactive_radicale {
105 105
 }
106 106
 
107 107
 function reconfigure_radicale {
108
-    echo -n ''
108
+    rm $RADICALE_USERS
109
+    rm -rf /var/www/radicale/collections/*
110
+    rm -rf /var/log/radicale/*
111
+
112
+    # create an admin password
113
+    if [ -f $IMAGE_PASSWORD_FILE ]; then
114
+        RADICALE_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
115
+    else
116
+        RADICALE_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
117
+    fi
118
+    add_user_radicale "$MY_USERNAME" "$RADICALE_PASSWORD"
119
+    sed -i "s|Your Radicale password is.*|Your Radicale password is: ${RADICALE_PASSWORD}|g" /home/$MY_USERNAME/README
120
+
121
+    touch /var/log/radicale/radicale.log
122
+    chown -R www-data:www-data /var/log/radicale
109 123
 }
110 124
 
111 125
 function upgrade_radicale {