mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Use REGEN_CONF_FILE global instead of hard-coded filename
This commit is contained in:
parent
817c3cdd41
commit
8e7684c7d5
2 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@ from moulinette.utils.log import getActionLogger
|
|||
|
||||
from moulinette.utils.filesystem import read_file
|
||||
from yunohost.service import _get_services, _save_services
|
||||
from yunohost.regenconf import _update_conf_hashes
|
||||
from yunohost.regenconf import _update_conf_hashes, REGEN_CONF_FILE
|
||||
|
||||
from yunohost.tools import Migration
|
||||
|
||||
|
@ -20,7 +20,7 @@ class MyMigration(Migration):
|
|||
def migrate(self):
|
||||
|
||||
if "conffiles" not in read_file("/etc/yunohost/services.yml") \
|
||||
or os.path.exists("/etc/yunohost/regenconf.yml"):
|
||||
or os.path.exists(REGEN_CONF_FILE):
|
||||
logger.warning(m18n.n("migration_0009_not_needed"))
|
||||
return
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ def regen_conf(operation_logger, names=[], with_diff=False, force=False, dry_run
|
|||
# in debian's postinst script
|
||||
if os.path.exists("/etc/yunohost/installed") \
|
||||
and ("conffiles" in read_file("/etc/yunohost/services.yml") \
|
||||
or not os.path.exists("/etc/yunohost/regenconf.yml")):
|
||||
or not os.path.exists(REGEN_CONF_FILE)):
|
||||
from yunohost.tools import _get_migration_by_name
|
||||
migration = _get_migration_by_name("decouple_regenconf_from_services")
|
||||
migration.migrate()
|
||||
|
|
Loading…
Add table
Reference in a new issue