Adding and removing users
This commit is contained in:
parent
9c07b17bb4
commit
dba12100ac
|
@ -66,10 +66,17 @@ function change_password_mediagoblin {
|
||||||
function add_user_mediagoblin {
|
function add_user_mediagoblin {
|
||||||
new_username="$1"
|
new_username="$1"
|
||||||
new_user_password="$2"
|
new_user_password="$2"
|
||||||
|
|
||||||
|
MEDIAGOBLIN_BASE_DIR=/var/www/$MEDIAGOBLIN_DOMAIN_NAME/htdocs
|
||||||
|
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg adduser --username $new_username --password $new_username $new_user_password" - mediagoblin
|
||||||
|
echo "0"
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove_user_mediagoblin {
|
function remove_user_mediagoblin {
|
||||||
remove_username="$1"
|
remove_username="$1"
|
||||||
|
MEDIAGOBLIN_BASE_DIR=/var/www/$MEDIAGOBLIN_DOMAIN_NAME/htdocs
|
||||||
|
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg deluser --username $new_username" - mediagoblin
|
||||||
|
echo "0"
|
||||||
}
|
}
|
||||||
|
|
||||||
function reconfigure_mediagoblin {
|
function reconfigure_mediagoblin {
|
||||||
|
@ -370,7 +377,7 @@ function install_mediagoblin {
|
||||||
systemctl start mediagoblin
|
systemctl start mediagoblin
|
||||||
|
|
||||||
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg dbupdate" - mediagoblin
|
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg dbupdate" - mediagoblin
|
||||||
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg adduser --username $MY_USERNAME --password admin $MEDIAGOBLIN_ADMIN_PASSWORD" - mediagoblin
|
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg adduser --username $MY_USERNAME --password $MY_USERNAME $MEDIAGOBLIN_ADMIN_PASSWORD" - mediagoblin
|
||||||
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg makeadmin $MY_USERNAME" - mediagoblin
|
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg makeadmin $MY_USERNAME" - mediagoblin
|
||||||
|
|
||||||
function_check create_site_certificate
|
function_check create_site_certificate
|
||||||
|
|
Loading…
Reference in New Issue