From 97ebb759ef3aa8724906f698f9eec836da761e84 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 5 Jan 2021 11:59:39 +0100 Subject: [PATCH] Add password argument --- README.md | 4 ---- check_process | 3 ++- manifest.json | 9 +++++++++ scripts/install | 3 ++- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b2c1e44..208a4c5 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,6 @@ Weblate is a libre web-based translation tool with tight version control integra * [YunoHost project uses Weblate for translations](https://translate.yunohost.org) -## Admin account - -An admin user is created at installation, the login is what you provided at installation, the password is **weblate**. - ## GitHub You'll need to give Weblate a GitHub user and a token. Please read [GitHub's documentation about token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/). diff --git a/check_process b/check_process index abc3fa6..f34e813 100644 --- a/check_process +++ b/check_process @@ -8,6 +8,7 @@ domain="domain.tld" (DOMAIN) path="/path" (PATH) admin="john" (USER) + password="randompass" is_public=1 (PUBLIC|public=1|private=0) github_account="myaccount" github_token="myoauthtoken" @@ -30,4 +31,4 @@ Notification=all ;;; Upgrade options ; commit=cef22ac5634565cecd2d8545229efe3fe79d85bc name=Upgrade from 3.11.3 -manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1&github_account=fake&github_token=fake + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1&github_account=fake&github_token=fake diff --git a/manifest.json b/manifest.json index a22d327..4c92f61 100644 --- a/manifest.json +++ b/manifest.json @@ -67,6 +67,15 @@ }, "example": "johndoe" }, + { + "name": "password", + "type": "password", + "ask": { + "en": "Set the administrator password", + "fr": "Définissez le mot de passe administrateur" + }, + "example": "Choose a password" + }, { "name": "github_account", "type": "string", diff --git a/scripts/install b/scripts/install index e79568b..0346ae9 100755 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN +password=$YNH_APP_ARG_PASSWORD is_public=$YNH_APP_ARG_IS_PUBLIC github_account=$YNH_APP_ARG_GITHUB_ACCOUNT github_token=$YNH_APP_ARG_GITHUB_TOKEN @@ -185,7 +186,7 @@ ynh_script_progression --message="Filling up the database..." --weight=10 # generate static files sudo -u $app $final_path/venv/bin/weblate collectstatic --noinput sudo -u $app $final_path/venv/bin/weblate createadmin --no-color \ - --password "weblate" \ + --password "$password" \ --username "$admin" \ --email "$admin_mail"