1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mastodon_ynh.git synced 2024-09-03 19:46:02 +02:00

Fix armored key

This commit is contained in:
yalh76 2019-03-27 21:20:14 +01:00
parent 2f69ed9251
commit 08485fd7d3
3 changed files with 16 additions and 6 deletions

View file

@ -15,6 +15,11 @@ source ynh_add_secure_repos__2
# MANAGE SCRIPT FAILURE
#=================================================
ynh_clean_setup () {
### Remove this function if there's nothing to clean before calling the remove script.
read -p "Press any key..."
true
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
@ -89,10 +94,9 @@ fi
# Install extra_repo debian package backports & yarn
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
ynh_install_extra_repo --repo="deb http://httpredir.debian.org/debian jessie-backports main"
ynh_install_extra_repo --repo="deb http://httpredir.debian.org/debian jessie-backports main" --append
fi
ynh_install_extra_repo --repo="deb https://dl.yarnpkg.com/debian/ stable main" --key=https://dl.yarnpkg.com/debian/pubkey.gpg
ynh_package_update
ynh_install_extra_repo --repo="deb https://dl.yarnpkg.com/debian/ stable main" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" --append
# install nodejs
ynh_install_nodejs 8

View file

@ -78,8 +78,7 @@ ynh_remove_ruby
ynh_remove_app_dependencies
ynh_remove_nodejs
ynh_remove_extra_repo jessie-backports
ynh_remove_extra_repo yarn
ynh_remove_extra_repo
#=================================================
# REMOVE APP MAIN DIR

View file

@ -137,7 +137,13 @@ ynh_install_extra_repo () {
if [ -n "$key" ]
then
mkdir -p "/etc/apt/trusted.gpg.d"
wget -q "$key" -O - | $wget_append /etc/apt/trusted.gpg.d/$name.gpg
if [[ "$(basename "$key")" =~ ".asc" ]]
then
local key_ext=asc
else
local key_ext=gpg
fi
wget -q "$key" -O - | gpg --dearmor | $wget_append /etc/apt/trusted.gpg.d/$name.$key_ext
fi
# Update the list of package with the new repo
@ -160,6 +166,7 @@ ynh_remove_extra_repo () {
ynh_secure_remove "/etc/apt/sources.list.d/$name.list"
ynh_secure_remove "/etc/apt/preferences.d/$name"
ynh_secure_remove "/etc/apt/trusted.gpg.d/$name.gpg"
ynh_secure_remove "/etc/apt/trusted.gpg.d/$name.asc"
# Update the list of package to exclude the old repo
ynh_package_update