mirror of
https://github.com/YunoHost-Apps/weblate_ynh.git
synced 2024-10-01 13:35:04 +02:00
Add password argument
This commit is contained in:
parent
26e45cc81c
commit
97ebb759ef
4 changed files with 13 additions and 6 deletions
|
@ -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/).
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue