Commit 1edebb58 authored by Benoît's avatar Benoît
Browse files

Changed paths to full paths

parent d7d22362
......@@ -8,7 +8,6 @@ if [ -z "$1" ]; then
fi
echo -e "\\n### Checking requirements..."
export LANG=en_US.UTF-8
rpm -qa | grep "git-"
if test $? -eq 1; then
yum -y install git
......@@ -40,23 +39,27 @@ cd /etc/letsencrypt/live/"$(hostname)"/ || exit
openssl pkcs8 -topk8 -nocrypt -in privkey.pem -inform PEM -out privkey.pem.der -outform DER
openssl x509 -in fullchain.pem -inform PEM -out fullchain.pem.der -outform DER
cd /usr/sbin/r1soft/jre/bin || exit
chmod 755 java keytool
wget -N https://gitlab.haisoft.net/pub/R1Soft_LetsEncryptIntegration/raw/master/importkey.zip
unzip -o importkey.zip
if [ ! -f "/usr/sbin/r1soft/jre/bin/ImportKey.class" ]; then
cd /usr/sbin/r1soft/jre/bin || exit
chmod 755 java keytool
wget -N https://gitlab.haisoft.net/pub/R1Soft_LetsEncryptIntegration/raw/master/importkey.zip
unzip -o importkey.zip
fi
export LANG=en_US.UTF-8
export _JAVA_OPTIONS=-Duser.home=/usr/sbin/r1soft/conf
./java ImportKey /etc/letsencrypt/live/"$(hostname)"/privkey.pem.der /etc/letsencrypt/live/"$(hostname)"/fullchain.pem.der
cd /usr/sbin/r1soft/conf/ || exit
/usr/sbin/r1soft/jre/bin/java -classpath /usr/sbin/r1soft/jre/bin/ ImportKey /etc/letsencrypt/live/"$(hostname)"/privkey.pem.der /etc/letsencrypt/live/"$(hostname)"/fullchain.pem.der
echo -e "importkey\npassword\npassword" | ./keytool -storepasswd -keystore /root/keystore.ImportKey
echo -e "importkey\npassword\npassword" | /usr/sbin/r1soft/jre/bin/keytool -storepasswd -keystore /usr/sbin/r1soft/conf/keystore.ImportKey
echo -e "password\nimportkey\npassword\npassword" | ./keytool -keypasswd -alias importkey -keystore /root/keystore.ImportKey
echo -e "password\nimportkey\npassword\npassword" | /usr/sbin/r1soft/jre/bin/keytool -keypasswd -alias importkey -keystore /usr/sbin/r1soft/conf/keystore.ImportKey
/bin/cp /root/keystore.ImportKey /root/keystore ; rm -f /root/keystore.ImportKey
/bin/mv /usr/sbin/r1soft/conf/keystore.ImportKey /usr/sbin/r1soft/conf/keystore
echo -e "password\nyes" | ./keytool -import -alias intermed -file /etc/letsencrypt/live/"$(hostname)"/chain.pem -keystore /root/keystore -trustcacerts
echo -e "password\nyes" | /usr/sbin/r1soft/jre/bin/keytool -import -alias intermed -file /etc/letsencrypt/live/"$(hostname)"/chain.pem -keystore /usr/sbin/r1soft/conf/keystore -trustcacerts
/bin/cp /usr/sbin/r1soft/conf/keystore /usr/sbin/r1soft/conf/keystore.old
/bin/cp /root/keystore /usr/sbin/r1soft/conf/keystore
service cdp-server restart
cd /usr/sbin/r1soft/conf/ || exit
......@@ -64,4 +67,4 @@ echo -e "password" | keytool -delete -keystore keystore -alias cdp
echo -e "password" | keytool -changealias -keystore keystore -alias importkey -destalias cdp
service cdp-server restart
service cdp-server restart
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment