Changing calendar passwords

This commit is contained in:
Bob Mottram 2016-11-17 09:46:37 +00:00
parent eccb39fc98
commit 6395234ec6
1 changed files with 13 additions and 6 deletions

View File

@ -51,8 +51,8 @@ radicale_variables=(ONION_ONLY
function remove_user_radicale {
remove_username="$1"
if grep "$remove_username:" ${RADICALE_USERS}; then
sed -i "/$remove_username:/d" ${RADICALE_USERS}
if grep "${remove_username}:" ${RADICALE_USERS}; then
sed -i "/${remove_username}:/d" ${RADICALE_USERS}
if [ -d /var/www/radicale/collections/${remove_username} ]; then
rm -rf /var/www/radicale/collections/${remove_username}
fi
@ -87,15 +87,22 @@ function add_user_radicale {
echo '0'
}
function change_password_radicale {
existing_username="$1"
new_user_password="$2"
if grep "${existing_username}:" ${RADICALE_USERS}; then
sed -i "/${existing_username}:/d" ${RADICALE_USERS}
htpasswd -bd ${RADICALE_USERS} "$existing_username" "$new_user_password"
systemctl reload radicale
fi
}
function install_interactive_radicale {
echo -n ''
APP_INSTALLED=1
}
function change_password_radicale {
echo -n ''
}
function reconfigure_radicale {
echo -n ''
}