diff --git a/alpinelinux/install-release.sh b/alpinelinux/install-release.sh index 49814a6..d3781ec 100644 --- a/alpinelinux/install-release.sh +++ b/alpinelinux/install-release.sh @@ -103,13 +103,12 @@ install_software() { } download_xray() { - curl -L -H 'Cache-Control: no-cache' -o "$ZIP_FILE" "$DOWNLOAD_LINK" -# - if [ "$?" -ne '0' ]; then + if ! curl -L -H 'Cache-Control: no-cache' -o "$ZIP_FILE" "$DOWNLOAD_LINK" -#; then echo 'error: Download failed! Please check your network or try again.' exit 1 fi - curl -L -H 'Cache-Control: no-cache' -o "$ZIP_FILE.dgst" "$DOWNLOAD_LINK.dgst" -# - if [ "$?" -ne '0' ]; then + + if ! curl -L -H 'Cache-Control: no-cache' -o "$ZIP_FILE.dgst" "$DOWNLOAD_LINK.dgst" -#; then echo 'error: Download failed! Please check your network or try again.' exit 1 fi @@ -168,8 +167,7 @@ install_startup_service_file() { OPENRC='0' if [ ! -f '/etc/init.d/xray' ]; then mkdir "${TMP_DIRECTORY}init.d/" - curl -o "${TMP_DIRECTORY}init.d/xray" https://raw.githubusercontent.com/XTLS/Xray-install/main/alpinelinux/init.d/xray -s - if [ "$?" -ne '0' ]; then + if ! curl -o "${TMP_DIRECTORY}init.d/xray" https://raw.githubusercontent.com/XTLS/Xray-install/main/alpinelinux/init.d/xray -s; then echo 'error: Failed to start service file download! Please check your network or try again.' exit 1 fi