mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
mdns: Misc fixes after tests on the battefield
This commit is contained in:
parent
ffc132f2c5
commit
4d0581bef2
2 changed files with 6 additions and 4 deletions
|
@ -30,18 +30,20 @@ do_init_regen() {
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir="$1"
|
pending_dir="$1"
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/dnsmasq
|
cd /usr/share/yunohost/templates/mdns
|
||||||
|
mkdir -p ${pending_dir}/etc/systemd/system/
|
||||||
cp yunomdns.service ${pending_dir}/etc/systemd/system/
|
cp yunomdns.service ${pending_dir}/etc/systemd/system/
|
||||||
|
|
||||||
getent passwd mdns &>/dev/null || useradd --no-create-home --shell /usr/sbin/nologin --system --user-group mdns
|
getent passwd mdns &>/dev/null || useradd --no-create-home --shell /usr/sbin/nologin --system --user-group mdns
|
||||||
|
|
||||||
|
mkdir -p ${pending_dir}/etc/yunohost
|
||||||
_generate_config > ${pending_dir}/etc/yunohost/mdns.yml
|
_generate_config > ${pending_dir}/etc/yunohost/mdns.yml
|
||||||
}
|
}
|
||||||
|
|
||||||
do_post_regen() {
|
do_post_regen() {
|
||||||
regen_conf_files="$1"
|
regen_conf_files="$1"
|
||||||
|
|
||||||
chown mdns:mdns ${pending_dir}/etc/yunohost/mdns.yml
|
chown mdns:mdns /etc/yunohost/mdns.yml
|
||||||
|
|
||||||
# If we changed the systemd ynh-override conf
|
# If we changed the systemd ynh-override conf
|
||||||
if echo "$regen_conf_files" | sed 's/,/\n/g' | grep -q "^/etc/systemd/system/yunomdns.service$"
|
if echo "$regen_conf_files" | sed 's/,/\n/g' | grep -q "^/etc/systemd/system/yunomdns.service$"
|
||||||
|
|
|
@ -163,7 +163,7 @@ def domain_add(operation_logger, domain, dyndns=False):
|
||||||
# because it's one of the major service, but in the long term we
|
# because it's one of the major service, but in the long term we
|
||||||
# should identify the root of this bug...
|
# should identify the root of this bug...
|
||||||
_force_clear_hashes(["/etc/nginx/conf.d/%s.conf" % domain])
|
_force_clear_hashes(["/etc/nginx/conf.d/%s.conf" % domain])
|
||||||
regen_conf(names=["nginx", "metronome", "dnsmasq", "postfix", "rspamd"])
|
regen_conf(names=["nginx", "metronome", "dnsmasq", "postfix", "rspamd", "mdns"])
|
||||||
app_ssowatconf()
|
app_ssowatconf()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -290,7 +290,7 @@ def domain_remove(operation_logger, domain, remove_apps=False, force=False):
|
||||||
"/etc/nginx/conf.d/%s.conf" % domain, new_conf=None, save=True
|
"/etc/nginx/conf.d/%s.conf" % domain, new_conf=None, save=True
|
||||||
)
|
)
|
||||||
|
|
||||||
regen_conf(names=["nginx", "metronome", "dnsmasq", "postfix"])
|
regen_conf(names=["nginx", "metronome", "dnsmasq", "postfix", "rspamd", "mdns"])
|
||||||
app_ssowatconf()
|
app_ssowatconf()
|
||||||
|
|
||||||
hook_callback("post_domain_remove", args=[domain])
|
hook_callback("post_domain_remove", args=[domain])
|
||||||
|
|
Loading…
Add table
Reference in a new issue