#!/bin/sh

if [ -n "$PLESK_INSTALLER_DEBUG" -o -n "$PLESK_INSTALLER_VERBOSE" ]; then
	set -x;
fi

prog="`basename $0`"
tmp_d="/usr/local/psa/var"
mu="`echo $prog | awk -F '-' '{print $1}'`"
mu_flag="$tmp_d/${mu}-gpgkey_install.flag"

[ -f "$mu_flag" ] && exit 0

wget -c http://autoinstall.plesk.com/plesk.gpg -O $tmp_d/plesk.gpg
apt-key add $tmp_d/plesk.gpg

touch $mu_flag
exit 0
