diff --git a/plugins/php/versions/53/xhprof.sh b/plugins/php/versions/53/xhprof.sh index fe249a3c7..6f8a6e508 100755 --- a/plugins/php/versions/53/xhprof.sh +++ b/plugins/php/versions/53/xhprof.sh @@ -53,6 +53,9 @@ Install_lib() return fi + if [ ! -f /tmp/xhprof ];then + mkdir -p /tmp/xhprof + fi echo "" >> $serverPath/php/$version/etc/php.ini echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini @@ -83,7 +86,6 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - rm -rf /tmp/xhprof $serverPath/php/init.d/php$version reload echo '===============================================' diff --git a/plugins/php/versions/54/xhprof.sh b/plugins/php/versions/54/xhprof.sh index be410f0fc..8e44b38d0 100755 --- a/plugins/php/versions/54/xhprof.sh +++ b/plugins/php/versions/54/xhprof.sh @@ -51,6 +51,10 @@ Install_lib() return fi + if [ ! -f /tmp/xhprof ];then + mkdir -p /tmp/xhprof + fi + echo "" >> $serverPath/php/$version/etc/php.ini echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini @@ -80,7 +84,6 @@ Uninstall_lib() sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - rm -rf /tmp/xhprof $serverPath/php/init.d/php$version reload echo '===============================================' diff --git a/plugins/php/versions/55/xhprof.sh b/plugins/php/versions/55/xhprof.sh index b45080958..60042d845 100755 --- a/plugins/php/versions/55/xhprof.sh +++ b/plugins/php/versions/55/xhprof.sh @@ -54,6 +54,10 @@ Install_lib() return fi + if [ ! -f /tmp/xhprof ];then + mkdir -p /tmp/xhprof + fi + echo "" >> $serverPath/php/$version/etc/php.ini echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini @@ -83,7 +87,6 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - rm -rf /tmp/xhprof $serverPath/php/init.d/php$version reload echo '===============================================' diff --git a/plugins/php/versions/56/xhprof.sh b/plugins/php/versions/56/xhprof.sh index 1d45665a6..3ed8f0d28 100755 --- a/plugins/php/versions/56/xhprof.sh +++ b/plugins/php/versions/56/xhprof.sh @@ -54,6 +54,10 @@ Install_lib() return fi + if [ ! -f /tmp/xhprof ];then + mkdir -p /tmp/xhprof + fi + echo "" >> $serverPath/php/$version/etc/php.ini echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini @@ -83,7 +87,6 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - rm -rf /tmp/xhprof $serverPath/php/init.d/php$version reload echo '===============================================' echo 'successful!' diff --git a/plugins/php/versions/70/xhprof.sh b/plugins/php/versions/70/xhprof.sh index 47a808031..f2f1525a5 100755 --- a/plugins/php/versions/70/xhprof.sh +++ b/plugins/php/versions/70/xhprof.sh @@ -54,6 +54,9 @@ Install_lib() return fi + if [ ! -f /tmp/xhprof ];then + mkdir -p /tmp/xhprof + fi echo "" >> $serverPath/php/$version/etc/php.ini echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini @@ -83,7 +86,6 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - rm -rf /tmp/xhprof $serverPath/php/init.d/php$version reload echo '===============================================' echo 'successful!' diff --git a/plugins/php/versions/71/xhprof.sh b/plugins/php/versions/71/xhprof.sh index 4464ff396..49221905f 100755 --- a/plugins/php/versions/71/xhprof.sh +++ b/plugins/php/versions/71/xhprof.sh @@ -54,6 +54,10 @@ Install_lib() return fi + if [ ! -f /tmp/xhprof ];then + mkdir -p /tmp/xhprof + fi + echo "" >> $serverPath/php/$version/etc/php.ini echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini @@ -83,7 +87,6 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - rm -rf /tmp/xhprof $serverPath/php/init.d/php$version reload echo '===============================================' echo 'successful!' diff --git a/plugins/php/versions/72/xhprof.sh b/plugins/php/versions/72/xhprof.sh index 995a11969..7ae68b708 100755 --- a/plugins/php/versions/72/xhprof.sh +++ b/plugins/php/versions/72/xhprof.sh @@ -54,6 +54,9 @@ Install_lib() return fi + if [ ! -f /tmp/xhprof ];then + mkdir -p /tmp/xhprof + fi echo "" >> $serverPath/php/$version/etc/php.ini echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini @@ -83,7 +86,6 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - rm -rf /tmp/xhprof $serverPath/php/init.d/php$version reload echo '===============================================' echo 'successful!' diff --git a/plugins/php/versions/73/xhprof.sh b/plugins/php/versions/73/xhprof.sh index 8b75bb673..1d4712cae 100755 --- a/plugins/php/versions/73/xhprof.sh +++ b/plugins/php/versions/73/xhprof.sh @@ -54,6 +54,9 @@ Install_lib() return fi + if [ ! -f /tmp/xhprof ];then + mkdir -p /tmp/xhprof + fi echo "" >> $serverPath/php/$version/etc/php.ini echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini @@ -83,7 +86,6 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - rm -rf /tmp/xhprof $serverPath/php/init.d/php$version reload echo '===============================================' echo 'successful!' diff --git a/plugins/php/versions/74/xhprof.sh b/plugins/php/versions/74/xhprof.sh index c1cb4a60b..4e78fb7c7 100755 --- a/plugins/php/versions/74/xhprof.sh +++ b/plugins/php/versions/74/xhprof.sh @@ -54,6 +54,9 @@ Install_lib() return fi + if [ ! -f /tmp/xhprof ];then + mkdir -p /tmp/xhprof + fi echo "" >> $serverPath/php/$version/etc/php.ini echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini @@ -83,7 +86,6 @@ Uninstall_lib() sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile - rm -rf /tmp/xhprof $serverPath/php/init.d/php$version reload echo '===============================================' echo 'successful!' diff --git a/plugins/xhprof/install.sh b/plugins/xhprof/install.sh index ad6c102af..14af37c44 100755 --- a/plugins/xhprof/install.sh +++ b/plugins/xhprof/install.sh @@ -25,7 +25,7 @@ Install_xh() Uninstall_xh() { rm -rf ${serverPath}/xhprof - rm -rf /tmp/xhprof + cd /tmp/xhprof && rm -rf *.xhprof echo '卸载完成' > $install_tmp }