1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/mifar-osresty

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
upgrade.sh 1.8 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
ivmm Отправлено 05.10.2016 07:42 a806a0e
#!/bin/bash
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
clear
printf "
#######################################################################
# OsResty , Install the OpenResty and optimization #
#######################################################################
"
# get pwd
sed -i "s@^oneinstack_dir.*@oneinstack_dir=`pwd`@" ./options.conf
. ./versions.txt
. ./options.conf
. ./include/color.sh
. ./include/check_os.sh
. ./include/check_dir.sh
. ./include/download.sh
. ./include/get_char.sh
. ./include/upgrade_web.sh
# Check if user is root
[ $(id -u) != "0" ] && { echo "${CFAILURE}Error: You must be root to run this script${CEND}"; exit 1; }
# get the IP information
PUBLIC_IPADDR=`./include/get_public_ipaddr.py`
IPADDR_COUNTRY=`./include/get_ipaddr_state.py $PUBLIC_IPADDR | awk '{print $1}'`
Usage(){
printf "
Usage: $0 [ ${CMSG}web${CEND}]
${CMSG}web${CEND} --->Upgrade Nginx/Tengine/OpenResty
"
}
Menu(){
while :; do
printf "
What Are You Doing?
\t${CMSG}1${CEND}. Upgrade OpenResty
\t${CMSG}q${CEND}. Exit
"
echo
read -p "Please input the correct option: " Number
if [[ ! $Number =~ ^[1-5,q]$ ]];then
echo "${CWARNING}input error! Please only input 1 and q${CEND}"
else
case "$Number" in
1)
if [ -e "$openresty_install_dir/nginx/sbin/nginx" ];then
Upgrade_OpenResty
fi
;;
q)
exit
;;
esac
fi
done
}
if [ $# == 0 ];then
Menu
elif [ $# == 1 ];then
case $1 in
web)
if [ -e "$openresty_install_dir/nginx/sbin/nginx" ];then
Upgrade_OpenResty
fi
;;
*)
Usage
;;
esac
else
Usage
fi
Contact GitHub API Training Shop Blog About

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/mifar-osresty.git
git@api.gitlife.ru:oschina-mirror/mifar-osresty.git
oschina-mirror
mifar-osresty
mifar-osresty
master