No braces
This commit is contained in:
parent
dea8b96ba7
commit
a9f1db727d
|
@ -188,11 +188,13 @@ function create_etherpad_settings {
|
|||
|
||||
function remove_user_etherpad {
|
||||
remove_username="$1"
|
||||
|
||||
read_config_param ETHERPAD_DOMAIN_NAME
|
||||
|
||||
${PROJECT_NAME}-pass -u $remove_username --rmapp etherpad
|
||||
|
||||
if ! grep -q "\"${remove_username}\": {" /var/www/${ETHERPAD_DOMAIN_NAME}/htdocs/settings.json; then
|
||||
sed -i "/\"${remove_username}\": {/,/},/d" /var/www/${ETHERPAD_DOMAIN_NAME}/htdocs/settings.json
|
||||
if ! grep -q "\"$remove_username\": {" /var/www/${ETHERPAD_DOMAIN_NAME}/htdocs/settings.json; then
|
||||
sed -i "/\"$remove_username\": {/,/},/d" /var/www/${ETHERPAD_DOMAIN_NAME}/htdocs/settings.json
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -201,8 +203,8 @@ function add_user_etherpad {
|
|||
new_user_password="$2"
|
||||
${PROJECT_NAME}-pass -u $new_username -a etherpad -p "$new_user_password"
|
||||
read_config_param ETHERPAD_DOMAIN_NAME
|
||||
if ! grep -q "\"${new_username}\": {" /var/www/${ETHERPAD_DOMAIN_NAME}/htdocs/settings.json; then
|
||||
sed -i "/\"users\": {/a \"${new_username}\": { \"password\": \"${new_user_password}\", \"is_admin\": false }," /var/www/${ETHERPAD_DOMAIN_NAME}/htdocs/settings.json
|
||||
if ! grep -q "\"$new_username\": {" /var/www/${ETHERPAD_DOMAIN_NAME}/htdocs/settings.json; then
|
||||
sed -i "/\"users\": {/a \"$new_username\": { \"password\": \"$new_user_password\", \"is_admin\": false }," /var/www/${ETHERPAD_DOMAIN_NAME}/htdocs/settings.json
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue