Adding and removing pleroma users noninteractively

This commit is contained in:
Bob Mottram 2018-04-17 10:30:57 +01:00
parent 3bcad80f38
commit 6b2de7165f
1 changed files with 7 additions and 0 deletions

View File

@ -257,6 +257,8 @@ function logging_off_pleroma {
function remove_user_pleroma {
remove_username="$1"
cd $PLEROMA_DIR || exit 252498
mix rm_user "$remove_username"
"${PROJECT_NAME}-pass" -u "$remove_username" --rmapp pleroma
}
@ -264,6 +266,8 @@ function add_user_pleroma {
new_username="$1"
new_user_password="$2"
cd $PLEROMA_DIR || exit 348346
mix register_user "$new_username" "$new_username" "$new_username@$HOSTNAME" $"Your bio goes here" "$new_user_password"
"${PROJECT_NAME}-pass" -u "$new_username" -a pleroma -p "$new_user_password"
echo '0'
@ -1236,6 +1240,9 @@ function install_pleroma {
systemctl enable pleroma
systemctl start pleroma
cd $PLEROMA_DIR || exit 1935638
mix register_user "$MY_USERNAME" "$MY_USERNAME" "$MY_EMAIL_ADDRESS" $"Your bio goes here" "$PLEROMA_ADMIN_PASSWORD"
APP_INSTALLED=1
}