Merge pull request #986 from autra/fix_service_add_log_type_default_value

Fix service add log type default value
This commit is contained in:
Alexandre Aubin 2020-05-08 23:40:09 +02:00 committed by GitHub
commit 355ed7fd94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -996,7 +996,6 @@ service:
choices:
- file
- systemd
default: file
--test_status:
help: Specify a custom bash command to check the status of the service. Note that it only makes sense to specify this if the corresponding systemd service does not return the proper information already.
--test_conf:

View file

@ -70,7 +70,8 @@ def service_add(name, description=None, log=None, log_type=None, test_status=Non
if log_type is not None:
logger.warning("/!\\ Packagers! --log_type is deprecated. You do not need to specify --log_type systemd anymore ... Yunohost now automatically fetch the journalctl of the systemd service by default.")
# Usually when adding such a service, the service name will be provided so we remove it as it's not a log file path
log.remove(name)
if name in log:
log.remove(name)
service['log'] = log