diff options
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/preInstall.sh | 17 | ||||
| -rw-r--r-- | cmake/preUninstall.sh | 20 |
2 files changed, 22 insertions, 15 deletions
diff --git a/cmake/preInstall.sh b/cmake/preInstall.sh index d060bc9..be8feb2 100644 --- a/cmake/preInstall.sh +++ b/cmake/preInstall.sh @@ -13,3 +13,20 @@ fi if [[ -z `grep -rn 'QUIC' ${DST}/etc/entrylist.conf` ]];then echo "QUIC" >> ${DST}/etc/entrylist.conf fi + + +DST=${RPM_INSTALL_PREFIX}/sapp/ + +mkdir -p ${DST}/stellar_plugin +touch ${DST}/stellar_plugin/spec.toml + +if ! grep -q '^\./plug/stellar_plugin/quic.so' "${DST}/stellar_plugin/spec.toml"; then + echo -e "\n" >> "${DST}/stellar_plugin/spec.toml" + echo -e "[[plugin]]" >> "${DST}/stellar_plugin/spec.toml" + echo -e "path = \"./stellar_plugin/quic/quic.so\"" >> "${DST}/stellar_plugin/spec.toml" + echo -e "init = \"QUIC_ONLOAD\"" >> "${DST}/stellar_plugin/spec.toml" + echo -e "exit = \"QUIC_UNLOAD\"" >> "${DST}/stellar_plugin/spec.toml" + echo -e "\n" >> "${DST}/stellar_plugin/spec.toml" +fi + + diff --git a/cmake/preUninstall.sh b/cmake/preUninstall.sh index 377a0f5..3142b27 100644 --- a/cmake/preUninstall.sh +++ b/cmake/preUninstall.sh @@ -1,17 +1,7 @@ -#!/bin/sh if [ $1 == 0 ]; then - DST=${RPM_INSTALL_PREFIX} - mkdir -p ${DST}/plug/business/ - touch ${DST}/plug/conflist.inf - - mkdir -p ${DST}/etc/ - touch ${DST}/etc/entrylist.conf - - if [[ -f ${DST}/plug/conflist.inf ]];then - sed -i '/quic.inf/d' ${DST}/plug/conflist.inf - fi - - if [[ -f ${DST}/etc/entrylist.conf ]];then - sed -i '/QUIC/d' ${DST}/etc/entrylist.conf - fi + DST=${RPM_INSTALL_PREFIX}/sapp/stellar_plugin + sed -i -n '$!N;/quic.so/!P;D' ${DST}/spec.toml + sed -i '/QUIC_ONLOAD/d' ${DST}/spec.toml + sed -i '/QUIC_UNLOAD/d' ${DST}/spec.toml fi + |
