From 6b2de7165fd8d281a070029409c9febc1c278583 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 17 Apr 2018 10:30:57 +0100 Subject: [PATCH] Adding and removing pleroma users noninteractively --- src/freedombone-app-pleroma | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/freedombone-app-pleroma b/src/freedombone-app-pleroma index c41c8483..25918957 100755 --- a/src/freedombone-app-pleroma +++ b/src/freedombone-app-pleroma @@ -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 }