Skip to content
Snippets Groups Projects
Commit 94257175 authored by Bob Mottram's avatar Bob Mottram
Browse files

Create a password for webadmin

parent 1934ff7e
No related branches found
No related tags found
No related merge requests found
......@@ -450,10 +450,21 @@ function web_admin_onion_only {
sed -i 's|onion_only=false;|onion_only=true;|g' "/var/www/${local_hostname}/htdocs/admin/installapp.php"
}
function web_admin_setup_login {
read_config_param MY_USERNAME
webadmin_password=$("${PROJECT_NAME}-pass" -u "$MY_USERNAME" -a webadmin)
if [ ! "$webadmin_password" ]; then
webadmin_password="$(create_password "${MINIMUM_PASSWORD_LENGTH}")"
"${PROJECT_NAME}-pass" -u "$MY_USERNAME" -a webadmin -p "$webadmin_password"
fi
}
function install_web_admin {
# This is intended as an admin web user interface
# similar to Plinth or the yunohost
web_admin_setup_login
language_subdir=$(web_admin_get_language_subdir)
local_hostname=$(grep 'host-name' /etc/avahi/avahi-daemon.conf | awk -F '=' '{print $2}').local
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment