mirror of
https://github.com/YunoHost-Apps/wireguard_ynh.git
synced 2024-09-03 20:35:58 +02:00
Damn the past, stay level 6
This commit is contained in:
parent
1ac64e078a
commit
4c4d4f272e
1 changed files with 0 additions and 22 deletions
|
@ -70,28 +70,6 @@ then
|
||||||
ynh_permission_update --permission=main --remove=visitors
|
ynh_permission_update --permission=main --remove=visitors
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Downgrade linux-image-$arch if updated to the buster-backports version
|
|
||||||
linuximage_version=$(ynh_package_version --package=linux-image-$architecture)
|
|
||||||
if [[ $linuximage_version == *"bpo10"* ]]
|
|
||||||
then
|
|
||||||
# Downgrading using ynh_package_install apt command without "--no-remove" and with "--allow-downgrades"
|
|
||||||
# It will remove wireguard-ynh-deps and wireguard but they will be reinstalled throught upgrade process
|
|
||||||
ynh_apt --allow-downgrades --option Dpkg::Options::=--force-confdef \
|
|
||||||
--option Dpkg::Options::=--force-confold install linux-image-$architecture/stable
|
|
||||||
|
|
||||||
#Remove backports kernel if running on it and send a mail to the admin to ask him to reboot
|
|
||||||
linuxkernel_version=$(uname -r)
|
|
||||||
if [[ $linuxkernel_version == *"bpo"* ]]
|
|
||||||
then
|
|
||||||
ynh_package_remove linux-image-$linuxkernel_version
|
|
||||||
|
|
||||||
echo "You've been using an experimental version of wireguard_ynh, which was using the backports version of the linux kernel.
|
|
||||||
Now wireguard_ynh use a DKMS module allowing itself to be used with the stable kernel, then the backports one was removed and a reboot is needed to go back to the stable one." > mail_to_send
|
|
||||||
|
|
||||||
ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="admin" --type=upgrade
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Drop sudoers file if present
|
# Drop sudoers file if present
|
||||||
if [ -f "/etc/sudoers.d/${app}_ynh" ]; then
|
if [ -f "/etc/sudoers.d/${app}_ynh" ]; then
|
||||||
ynh_secure_remove /etc/sudoers.d/${app}_ynh
|
ynh_secure_remove /etc/sudoers.d/${app}_ynh
|
||||||
|
|
Loading…
Reference in a new issue