diff --git a/data/hooks/conf_regen/40-glances b/data/hooks/conf_regen/40-glances deleted file mode 100755 index 70b8f4b5a..000000000 --- a/data/hooks/conf_regen/40-glances +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -set -e - -do_pre_regen() { - pending_dir=$1 - - cd /usr/share/yunohost/templates/glances - - install -D -m 644 glances.default "${pending_dir}/etc/default/glances" -} - -do_post_regen() { - regen_conf_files=$1 - - [[ -z "$regen_conf_files" ]] \ - || service glances restart -} - -FORCE=${2:-0} -DRY_RUN=${3:-0} - -case "$1" in - pre) - do_pre_regen $4 - ;; - post) - do_post_regen $4 - ;; - *) - echo "hook called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/src/yunohost/regenconf.py b/src/yunohost/regenconf.py index d1c90ceee..53deb7073 100644 --- a/src/yunohost/regenconf.py +++ b/src/yunohost/regenconf.py @@ -346,6 +346,11 @@ def _save_regenconf_infos(infos): Keyword argument: categories -- A dict containing the regenconf infos """ + + # Ugly hack to get rid of legacy glances stuff + if "glances" in infos: + del infos["glances"] + try: with open(REGEN_CONF_FILE, 'w') as f: yaml.safe_dump(infos, f, default_flow_style=False)