|
|
|
|
66
|
function add_user_mediagoblin {
|
66
|
function add_user_mediagoblin {
|
67
|
new_username="$1"
|
67
|
new_username="$1"
|
68
|
new_user_password="$2"
|
68
|
new_user_password="$2"
|
|
|
69
|
+
|
|
|
70
|
+ MEDIAGOBLIN_BASE_DIR=/var/www/$MEDIAGOBLIN_DOMAIN_NAME/htdocs
|
|
|
71
|
+ su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg adduser --username $new_username --password $new_username $new_user_password" - mediagoblin
|
|
|
72
|
+ echo "0"
|
69
|
}
|
73
|
}
|
70
|
|
74
|
|
71
|
function remove_user_mediagoblin {
|
75
|
function remove_user_mediagoblin {
|
72
|
remove_username="$1"
|
76
|
remove_username="$1"
|
|
|
77
|
+ MEDIAGOBLIN_BASE_DIR=/var/www/$MEDIAGOBLIN_DOMAIN_NAME/htdocs
|
|
|
78
|
+ su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg deluser --username $new_username" - mediagoblin
|
|
|
79
|
+ echo "0"
|
73
|
}
|
80
|
}
|
74
|
|
81
|
|
75
|
function reconfigure_mediagoblin {
|
82
|
function reconfigure_mediagoblin {
|
|
|
|
|
370
|
systemctl start mediagoblin
|
377
|
systemctl start mediagoblin
|
371
|
|
378
|
|
372
|
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg dbupdate" - mediagoblin
|
379
|
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg dbupdate" - mediagoblin
|
373
|
- su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg adduser --username $MY_USERNAME --password admin $MEDIAGOBLIN_ADMIN_PASSWORD" - mediagoblin
|
|
|
|
|
380
|
+ su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg adduser --username $MY_USERNAME --password $MY_USERNAME $MEDIAGOBLIN_ADMIN_PASSWORD" - mediagoblin
|
374
|
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg makeadmin $MY_USERNAME" - mediagoblin
|
381
|
su -c "cd $MEDIAGOBLIN_BASE_DIR/mediagoblin/ && bin/gmg makeadmin $MY_USERNAME" - mediagoblin
|
375
|
|
382
|
|
376
|
function_check create_site_certificate
|
383
|
function_check create_site_certificate
|