Browse Source

Minor update

old-stable
Mitesh Shah 11 years ago
parent
commit
9a61dbe9ba
  1. 2
      src/lib/apt_get_update.sh
  2. 6
      src/lib/dot_deb_gpg_key.sh
  3. 24
      src/lib/gpg_key_fix.sh

2
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 = " $?
}

6
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 = " $?
}

24
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
}
Loading…
Cancel
Save