Skip to content

Commit d5b770b

Browse files
committed
bug fix: directory check
1 parent a6228d4 commit d5b770b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cyberpanel_upgrade.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ if [[ -f /usr/local/CyberPanel/bin/python2 ]] ; then
219219
rm -rf /usr/local/CyberPanel/bin
220220
virtualenv -p /usr/bin/python3 --system-site-packages /usr/local/CyberPanel
221221
check_return
222-
elif [[ -f /usr/local/CyberPanel/bin/ ]] ; then
222+
elif [[ -d /usr/local/CyberPanel/bin/ ]] ; then
223223
echo -e "\nNo need to resetup virtualenv at /usr/local/CyberPanel...\n"
224224
else
225225
echo -e "\nNothing found, need fresh setup...\n"
@@ -272,7 +272,7 @@ check_return
272272
if [[ -f /usr/local/CyberCP/bin/python2 ]] ; then
273273
rm -rf /usr/local/CyberCP/bin
274274
virtualenv -p /usr/bin/python3 /usr/local/CyberCP
275-
elif [[ -f /usr/local/CyberCP/bin/ ]] ; then
275+
elif [[ -d /usr/local/CyberCP/bin/ ]] ; then
276276
echo -e "\nNo need to resetup virtualenv at /usr/local/CyberCP...\n"
277277
else
278278
virtualenv -p /usr/bin/python3 --system-site-packages /usr/local/CyberCP

0 commit comments

Comments
 (0)