diff --git a/src/lib/apt_get_update.sh b/src/lib/apt_get_update.sh index 5ce03eb6..4aadb21b 100644 --- a/src/lib/apt_get_update.sh +++ b/src/lib/apt_get_update.sh @@ -2,6 +2,6 @@ function apt_get_update() { - echo_blue "apt-get update, Please Wait..." + echo_blue "Executing apt-get update, Please Wait..." apt-get update &>> $EE_LOG || ee_error "Unable to execute apt-get update, exit status = " $? } diff --git a/src/lib/dot_deb_gpg_key.sh b/src/lib/dot_deb_gpg_key.sh index 99f51c57..2f7f9d99 100644 --- a/src/lib/dot_deb_gpg_key.sh +++ b/src/lib/dot_deb_gpg_key.sh @@ -2,6 +2,8 @@ function dot_deb_gpg_key() { - wget --no-check-certificate -cqO /tmp/dotdeb.gpg http://www.dotdeb.org/dotdeb.gpg || ee_error "Unable to download dotdeb GnuPG key, exit status = " $? - apt-key add /tmp/dotdeb.gpg &>> $EE_LOG || ee_error "Unable to add dotdeb GnuPG key, exit status = " $? + wget --no-check-certificate -cqO /tmp/dotdeb.gpg http://www.dotdeb.org/dotdeb.gpg \ + || ee_error "Unable to download dotdeb GnuPG key, exit status = " $? + apt-key add /tmp/dotdeb.gpg &>> $EE_LOG \ + || ee_error "Unable to add dotdeb GnuPG key, exit status = " $? } diff --git a/src/lib/gpg_key_fix.sh b/src/lib/gpg_key_fix.sh new file mode 100644 index 00000000..2f4bb8bf --- /dev/null +++ b/src/lib/gpg_key_fix.sh @@ -0,0 +1,24 @@ +# Check GnuPG key + +function gpg_key_fix() +{ + local gpg_key_check + + # GnuPG key check + grep gpg-key-fix /etc/easyengine/ee.conf | grep -i true &>> $EE_LOG + + if [ $? -eq 0 ];then + + # Fix GnuPG key problems + apt-get update > /dev/null 2> /tmp/gpg_key + + for gpg_key_check in $(grep "NO_PUBKEY" /tmp/gpg_key |sed "s/.*NO_PUBKEY //") + do + echo_blue "Processing GnuPG key: $gpg_key_check" + gpg --keyserver subkeys.pgp.net --recv $gpg_key_check \ + && gpg --export --armor $gpg_key_check \ + | apt-key add - + done + + fi +}