Created
January 18, 2019 16:56
-
-
Save brlin-tw/8c3af633c427a6930debfaab7e0c76dc to your computer and use it in GitHub Desktop.
CGGPKICryptAdapterSetup.patched.install.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errexit | |
if test "${USER}" != root; then | |
echo You should run this program as root. | |
exit 1 | |
fi | |
if test -e /opt/Changingtec/CGServiSign; then | |
/opt/Changingtec/CGServiSign/stopServiSign.sh || true | |
fi | |
rm -rf /opt/Changingtec/CGServiSign | |
mkdir -p /opt/Changingtec | |
rm -rf /opt/Changingtec/Files | |
tar zxvf CGGPKICryptAdapterSetup.tar.gz -C /opt/Changingtec | |
mv /opt/Changingtec/Files /opt/Changingtec/CGServiSign | |
chmod +x /opt/Changingtec/CGServiSign/importCACertLinux.sh | |
chmod +x /opt/Changingtec/CGServiSign/startServiSign.sh | |
chmod +x /opt/Changingtec/CGServiSign/stopServiSign.sh | |
chmod +x /opt/Changingtec/CGServiSign/CGServiSignKeeper | |
chmod +x /opt/Changingtec/CGServiSign/CGServiSign | |
echo --- | |
#rm -rf /tmp/* | |
cp /opt/Changingtec/CGServiSign/startServiSign.sh /etc/init.d | |
cp /opt/Changingtec/CGServiSign/stopServiSign.sh /etc/init.d | |
chmod +x /etc/init.d/startServiSign.sh | |
chmod +x /etc/init.d/stopServiSign.sh | |
ln -s /etc/init.d/startServiSign.sh /etc/rc5.d | |
ln -s /etc/init.d/stopServiSign.sh /etc/rc0.d | |
echo --- | |
/opt/Changingtec/CGServiSign/importCACertLinux.sh | |
/opt/Changingtec/CGServiSign/startServiSign.sh & | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment