mirror of https://github.com/XTLS/Xray-install
Alpine: shellcheck SC2181
parent
05051f5b17
commit
aa7228844e
|
@ -103,13 +103,12 @@ install_software() {
|
||||||
}
|
}
|
||||||
|
|
||||||
download_xray() {
|
download_xray() {
|
||||||
curl -L -H 'Cache-Control: no-cache' -o "$ZIP_FILE" "$DOWNLOAD_LINK" -#
|
if ! curl -L -H 'Cache-Control: no-cache' -o "$ZIP_FILE" "$DOWNLOAD_LINK" -#; then
|
||||||
if [ "$?" -ne '0' ]; then
|
|
||||||
echo 'error: Download failed! Please check your network or try again.'
|
echo 'error: Download failed! Please check your network or try again.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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.'
|
echo 'error: Download failed! Please check your network or try again.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -168,8 +167,7 @@ install_startup_service_file() {
|
||||||
OPENRC='0'
|
OPENRC='0'
|
||||||
if [ ! -f '/etc/init.d/xray' ]; then
|
if [ ! -f '/etc/init.d/xray' ]; then
|
||||||
mkdir "${TMP_DIRECTORY}init.d/"
|
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 ! curl -o "${TMP_DIRECTORY}init.d/xray" https://raw.githubusercontent.com/XTLS/Xray-install/main/alpinelinux/init.d/xray -s; then
|
||||||
if [ "$?" -ne '0' ]; then
|
|
||||||
echo 'error: Failed to start service file download! Please check your network or try again.'
|
echo 'error: Failed to start service file download! Please check your network or try again.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue