diff --git a/data/hooks/conf_regen/34-mysql b/data/hooks/conf_regen/34-mysql new file mode 100644 index 000000000..62d9d2b27 --- /dev/null +++ b/data/hooks/conf_regen/34-mysql @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +force=$1 + +function safe_copy () { + if [[ "$force" == "True" ]]; then + sudo yunohost service safecopy \ + -s mysql $1 $2 --force + else + sudo yunohost service safecopy \ + -s mysql $1 $2 + fi +} + +cd /usr/share/yunohost/templates/mysql + +if [[ "$(safe_copy my.cnf /etc/mysql/my.cnf)" == "True" ]]; then + sudo service mysql restart +fi diff --git a/data/hooks/conf_regen/37-avahi-daemon b/data/hooks/conf_regen/37-avahi-daemon new file mode 100644 index 000000000..31306de53 --- /dev/null +++ b/data/hooks/conf_regen/37-avahi-daemon @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +force=$1 + +function safe_copy () { + if [[ "$force" == "True" ]]; then + sudo yunohost service safecopy \ + -s avahi-daemon $1 $2 --force + else + sudo yunohost service safecopy \ + -s avahi-daemon $1 $2 + fi +} + +cd /usr/share/yunohost/templates/avahi-daemon + +if [[ "$(safe_copy avahi-daemon.conf /etc/avahi/avahi-daemon.conf)" == "True" ]]; then + sudo service avahi-daemon restart +fi diff --git a/data/hooks/conf_regen/40-glances b/data/hooks/conf_regen/40-glances new file mode 100644 index 000000000..9f7c9c5c8 --- /dev/null +++ b/data/hooks/conf_regen/40-glances @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +force=$1 + +function safe_copy () { + if [[ "$force" == "True" ]]; then + sudo yunohost service safecopy \ + -s glances $1 $2 --force + else + sudo yunohost service safecopy \ + -s glances $1 $2 + fi +} + +cd /usr/share/yunohost/templates/glances + +if [[ "$(safe_copy glances.default /etc/default/glances)" == "True" ]]; then + sudo service glances restart +fi diff --git a/data/templates/avahi-daemon/avahi-daemon.conf b/data/templates/avahi-daemon/avahi-daemon.conf new file mode 100644 index 000000000..d3542a411 --- /dev/null +++ b/data/templates/avahi-daemon/avahi-daemon.conf @@ -0,0 +1,68 @@ +# This file is part of avahi. +# +# avahi is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# avahi is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with avahi; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. + +# See avahi-daemon.conf(5) for more information on this configuration +# file! + +[server] +host-name=yunohost +domain-name=local +#browse-domains=0pointer.de, zeroconf.org +use-ipv4=yes +use-ipv6=yes +#allow-interfaces=eth0 +#deny-interfaces=eth1 +#check-response-ttl=no +#use-iff-running=no +#enable-dbus=yes +#disallow-other-stacks=no +#allow-point-to-point=no +#cache-entries-max=4096 +#clients-max=4096 +#objects-per-client-max=1024 +#entries-per-entry-group-max=32 +ratelimit-interval-usec=1000000 +ratelimit-burst=1000 + +[wide-area] +enable-wide-area=yes + +[publish] +#disable-publishing=no +#disable-user-service-publishing=no +#add-service-cookie=no +#publish-addresses=yes +#publish-hinfo=yes +#publish-workstation=yes +#publish-domain=yes +#publish-dns-servers=192.168.50.1, 192.168.50.2 +#publish-resolv-conf-dns-servers=yes +#publish-aaaa-on-ipv4=yes +#publish-a-on-ipv6=no + +[reflector] +#enable-reflector=no +#reflect-ipv=no + +[rlimits] +#rlimit-as= +rlimit-core=0 +rlimit-data=4194304 +rlimit-fsize=0 +rlimit-nofile=768 +rlimit-stack=4194304 +rlimit-nproc=3 diff --git a/data/templates/glances/glances.default b/data/templates/glances/glances.default index 90c29eb70..22337a0d9 100644 --- a/data/templates/glances/glances.default +++ b/data/templates/glances/glances.default @@ -1,2 +1,5 @@ -DAEMON_ARGS="-B 127.0.0.1" -RUN="yes" +# Default is to launch glances with '-s' option. +DAEMON_ARGS="-s -B 127.0.0.1" + +# Change to 'true' to have glances running at startup +RUN="true"