mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Also lint/reformat debian scripts
This commit is contained in:
parent
5a7a719661
commit
28b1bbcc86
2 changed files with 32 additions and 33 deletions
59
debian/postinst
vendored
59
debian/postinst
vendored
|
@ -3,36 +3,35 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
rm -rf /var/cache/moulinette/*
|
rm -rf /var/cache/moulinette/*
|
||||||
|
|
||||||
mkdir -p /usr/share/moulinette/actionsmap/
|
mkdir -p /usr/share/moulinette/actionsmap/
|
||||||
ln -sf /usr/share/yunohost/actionsmap/yunohost.yml /usr/share/moulinette/actionsmap/yunohost.yml
|
ln -sf /usr/share/yunohost/actionsmap/yunohost.yml /usr/share/moulinette/actionsmap/yunohost.yml
|
||||||
|
|
||||||
if [ ! -f /etc/yunohost/installed ]; then
|
if [ ! -f /etc/yunohost/installed ]; then
|
||||||
# If apps/ is not empty, we're probably already installed in the past and
|
# If apps/ is not empty, we're probably already installed in the past and
|
||||||
# something funky happened ...
|
# something funky happened ...
|
||||||
if [ -d /etc/yunohost/apps/ ] && ls /etc/yunohost/apps/* >/dev/null 2>&1
|
if [ -d /etc/yunohost/apps/ ] && ls /etc/yunohost/apps/* >/dev/null 2>&1; then
|
||||||
then
|
echo "Sounds like /etc/yunohost/installed mysteriously disappeared ... You should probably contact the Yunohost support ..."
|
||||||
echo "Sounds like /etc/yunohost/installed mysteriously disappeared ... You should probably contact the Yunohost support ..."
|
else
|
||||||
else
|
bash /usr/share/yunohost/hooks/conf_regen/01-yunohost init
|
||||||
bash /usr/share/yunohost/hooks/conf_regen/01-yunohost init
|
bash /usr/share/yunohost/hooks/conf_regen/02-ssl init
|
||||||
bash /usr/share/yunohost/hooks/conf_regen/02-ssl init
|
bash /usr/share/yunohost/hooks/conf_regen/09-nslcd init
|
||||||
bash /usr/share/yunohost/hooks/conf_regen/09-nslcd init
|
bash /usr/share/yunohost/hooks/conf_regen/46-nsswitch init
|
||||||
bash /usr/share/yunohost/hooks/conf_regen/46-nsswitch init
|
bash /usr/share/yunohost/hooks/conf_regen/06-slapd init
|
||||||
bash /usr/share/yunohost/hooks/conf_regen/06-slapd init
|
bash /usr/share/yunohost/hooks/conf_regen/15-nginx init
|
||||||
bash /usr/share/yunohost/hooks/conf_regen/15-nginx init
|
bash /usr/share/yunohost/hooks/conf_regen/37-mdns init
|
||||||
bash /usr/share/yunohost/hooks/conf_regen/37-mdns init
|
fi
|
||||||
fi
|
else
|
||||||
else
|
echo "Regenerating configuration, this might take a while..."
|
||||||
echo "Regenerating configuration, this might take a while..."
|
yunohost tools regen-conf --output-as none
|
||||||
yunohost tools regen-conf --output-as none
|
|
||||||
|
|
||||||
echo "Launching migrations..."
|
echo "Launching migrations..."
|
||||||
yunohost tools migrations run --auto
|
yunohost tools migrations run --auto
|
||||||
|
|
||||||
echo "Re-diagnosing server health..."
|
echo "Re-diagnosing server health..."
|
||||||
yunohost diagnosis run --force
|
yunohost diagnosis run --force
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,13 +49,13 @@ do_configure() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
configure)
|
configure)
|
||||||
do_configure
|
do_configure
|
||||||
;;
|
;;
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
abort-upgrade | abort-remove | abort-deconfigure) ;;
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
echo "postinst called with unknown argument \`$1'" >&2
|
echo "postinst called with unknown argument \`$1'" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
6
debian/postrm
vendored
6
debian/postrm
vendored
|
@ -6,12 +6,12 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$1" = "purge" ]; then
|
if [ "$1" = "purge" ]; then
|
||||||
update-rc.d yunohost-firewall remove >/dev/null
|
update-rc.d yunohost-firewall remove >/dev/null
|
||||||
rm -f /etc/yunohost/installed
|
rm -f /etc/yunohost/installed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "remove" ]; then
|
if [ "$1" = "remove" ]; then
|
||||||
rm -f /etc/yunohost/installed
|
rm -f /etc/yunohost/installed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Reset dpkg vendor to debian
|
# Reset dpkg vendor to debian
|
||||||
|
|
Loading…
Add table
Reference in a new issue