Create an address book

This commit is contained in:
Bob Mottram 2016-11-17 15:15:10 +00:00
parent df6b6d7a65
commit d55591b678
1 changed files with 7 additions and 2 deletions

View File

@ -60,7 +60,7 @@ function remove_user_radicale {
if [ -f /var/www/radicale/collections/${remove_username}.props ]; then
rm /var/www/radicale/collections/${remove_username}.props
fi
systemctl reload radicale
systemctl restart radicale
fi
}
@ -82,8 +82,13 @@ function add_user_radicale {
echo 'PRODID:-//Radicale//NONSGML Radicale Server//EN' >> /var/www/radicale/collections/${new_username}/calendar
echo 'VERSION:2.0' >> /var/www/radicale/collections/${new_username}/calendar
echo 'END:VCALENDAR' >> /var/www/radicale/collections/${new_username}/calendar
addresses_str=$"Addresses"
echo "{\"tag\": \"VADDRESSBOOK\", \"D:displayname\": \"${addresses_str}\"}" > /var/www/radicale/collections/addresses.props
touch /var/www/radicale/collections/addresses
chown -R www-data:www-data /var/www/radicale
systemctl reload radicale
chmod -R 755 /var/www/radicale/*
systemctl restart radicale
fi
echo '0'
}