Sindbad~EG File Manager
Current Path : /opt/omi/lib/Scripts/ |
|
Current File : //opt/omi/lib/Scripts/ImportGPGKey.sh |
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage:"
echo " $0 PUBLIC_GPG_KEY"
exit 1
fi
if [ -z "$2" ]; then
KEYRING_NAME="keyring.gpg"
else
KEYRING_NAME=$2
fi
DSC_ETC_DIR=/etc/opt/omi/conf/omsconfig
HOME=$DSC_ETC_DIR gpg --no-default-keyring --keyring $DSC_ETC_DIR/$KEYRING_NAME --import $1
RETVAL=$?
if [ "omsconfig" = "omsagent" ]; then
if [ `id -u` = 0 ] ; then
chown omsagent $DSC_ETC_DIR/$KEYRING_NAME
fi
fi
exit $RETVAL
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists