mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
* remove offensive language in package ban config I understand that some users do silly things with their system configuration and this ban is supposed to prevent that. I just improved the wording for any user who like me stumbles across this file on their system... * [enh] Imrpove warnings * fix spelling mistakes Co-authored-by: ljf (zamentur) <zamentur@users.noreply.github.com>
73 lines
1.5 KiB
Bash
Executable file
73 lines
1.5 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
do_pre_regen() {
|
|
pending_dir=$1
|
|
|
|
mkdir --parents "${pending_dir}/etc/apt/preferences.d"
|
|
|
|
packages_to_refuse_from_sury="php php-fpm php-mysql php-xml php-zip php-mbstring php-ldap php-gd php-curl php-bz2 php-json php-sqlite3 php-intl openssl libssl1.1 libssl-dev"
|
|
for package in $packages_to_refuse_from_sury
|
|
do
|
|
echo "
|
|
Package: $package
|
|
Pin: origin \"packages.sury.org\"
|
|
Pin-Priority: -1" >> "${pending_dir}/etc/apt/preferences.d/extra_php_version"
|
|
done
|
|
|
|
echo "
|
|
|
|
# PLEASE READ THIS WARNING AND DON'T EDIT THIS FILE
|
|
|
|
# You are probably reading this file because you tried to install apache2 or
|
|
# bind9. These 2 packages conflict with YunoHost.
|
|
|
|
# Installing apache2 will break nginx and break the entire YunoHost ecosystem
|
|
# on your server, therefore don't remove those lines!
|
|
|
|
# You have been warned.
|
|
|
|
Package: apache2
|
|
Pin: release *
|
|
Pin-Priority: -1
|
|
|
|
Package: apache2-bin
|
|
Pin: release *
|
|
Pin-Priority: -1
|
|
|
|
# Also bind9 will conflict with dnsmasq.
|
|
# Same story as for apache2.
|
|
# Don't install it, don't remove those lines.
|
|
|
|
Package: bind9
|
|
Pin: release *
|
|
Pin-Priority: -1
|
|
" >> "${pending_dir}/etc/apt/preferences.d/ban_packages"
|
|
|
|
}
|
|
|
|
do_post_regen() {
|
|
regen_conf_files=$1
|
|
|
|
# Make sure php7.3 is the default version when using php in cli
|
|
update-alternatives --set php /usr/bin/php7.3
|
|
}
|
|
|
|
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
|