mirror of
https://github.com/Mailu/Mailu.git
synced 2025-02-09 13:23:54 +02:00
replace _ with - in cli options
This commit is contained in:
parent
ab33ba2172
commit
bc617cf8ec
@ -86,10 +86,10 @@ def user(localpart, domain_name, password, hash_scheme=None):
|
||||
|
||||
|
||||
@mailu.command()
|
||||
@click.option('-n', '--domain_name')
|
||||
@click.option('-u', '--max_users')
|
||||
@click.option('-a', '--max_aliases')
|
||||
@click.option('-q', '--max_quota_bytes')
|
||||
@click.option('-n', '--domain-name')
|
||||
@click.option('-u', '--max-users')
|
||||
@click.option('-a', '--max-aliases')
|
||||
@click.option('-q', '--max-quota-bytes')
|
||||
@flask_cli.with_appcontext
|
||||
def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=0):
|
||||
domain = models.Domain.query.get(domain_name)
|
||||
@ -126,7 +126,7 @@ def user_import(localpart, domain_name, password_hash, hash_scheme = None):
|
||||
|
||||
@mailu.command()
|
||||
@click.option('-v', '--verbose')
|
||||
@click.option('-d', '--delete_objects')
|
||||
@click.option('-d', '--delete-objects')
|
||||
@flask_cli.with_appcontext
|
||||
def config_update(verbose=False, delete_objects=False):
|
||||
"""sync configuration with data from YAML-formatted stdin"""
|
||||
|
@ -30,7 +30,8 @@ user
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker-compose exec admin flask mailu user --hash_scheme='SHA512-CRYPT' myuser example.net 'password123'
|
||||
docker-compose exec admin flask mailu user myuser example.net 'password123'
|
||||
|
||||
|
||||
user-import
|
||||
-----------
|
||||
@ -55,7 +56,7 @@ The sole purpose of this command is for importing users/aliases in bulk and sync
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cat mail-config.yml | docker-compose exec admin flask mailu config-update --delete_objects
|
||||
cat mail-config.yml | docker-compose exec -T admin flask mailu config-update --delete-objects
|
||||
|
||||
where mail-config.yml looks like:
|
||||
|
||||
@ -72,7 +73,7 @@ where mail-config.yml looks like:
|
||||
domain: example.com
|
||||
destination: "user1@example.com,user2@example.com"
|
||||
|
||||
without ``--delete_object`` option config-update will only add/update new values but will *not* remove any entries missing in provided YAML input.
|
||||
without ``--delete-object`` option config-update will only add/update new values but will *not* remove any entries missing in provided YAML input.
|
||||
|
||||
Users
|
||||
-----
|
||||
|
Loading…
x
Reference in New Issue
Block a user