全球主机交流论坛
标题:
A2系统自带的shell不错分享下哈哈
[打印本页]
作者:
chaoren521
时间:
2012-2-9 11:02
标题:
A2系统自带的shell不错分享下哈哈
#!/bin/bash -
#===============================================================================
#
# FILE: quickinstall.sh
#
# USAGE: ./quickinstall.sh
#
# DESCRIPTION: Quick Installation of Applications
#
# AUTHOR: Mark J.
# COMPANY: A2 Hosting
# CREATED: 08/04/2011 15:45:46 PM EDT
# REVISION: 2
#===============================================================================
#set -o nounset # Treat unset variables as an error
# Define variables
#Determine OS and menu to provide
echo "Verifying latest menu, please wait..."
if [ -f /etc/redhat-release ];
then
OS=`cat /etc/redhat-release | awk '{print $1}'`
if [ $OS = CentOS ]
then
OSV=`cat /etc/redhat-release | awk '{print $3}' | cut -d "." -f1`
if [ $OSV = 5 ]
then
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/CENTOS5
sh /usr/src/menu.sh
else
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/CENTOS6
sh /usr/src/menu.sh
fi
elif [ $OS = Fedora ]
then
OSV=`cat /etc/redhat-release | awk '{print $3}'`
if [ $OSV = 12 ]
then
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/FEDORA12
sh /usr/src/menu.sh
elif [ $OSV = 13 ]
then
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/FEDORA13
sh /usr/src/menu.sh
elif [ $OSV = 14 ]
then
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/FEDORA14
sh /usr/src/menu.sh
else
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/FEDORA15
sh /usr/src/menu.sh
fi
fi
elif [ -f /etc/lsb-release ];
then [ OS='Ubuntu' ]
OSV=`cat /etc/lsb-release | grep DISTRIB_RELEASE | awk '{print $1}' | cut -d "=" -f2`
if [ $OSV = 10.04 ]
then
apt-get -qq install wget > /dev/null 2>&1
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/UBUNTU104
sh /usr/src/menu.sh
elif [ $OSV = 11.04 ]
then
apt-get -qq install wget > /dev/null 2>&1
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/UBUNTU1104
sh /usr/src/menu.sh
else
apt-get -qq install wget > /dev/null 2>&1
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/UBUNTU1110
sh /usr/src/menu.sh
fi
elif [ -f /etc/debian_version ];
then
OS='Debian'
OSV=`cat /etc/debian_version | cut -d "." -f1`
if [ $OSV = 5 ] > /dev/null 2>&1
then
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/DEBIAN5
sh /usr/src/menu.sh
else
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/DEBIAN6
sh /usr/src/menu.sh
fi
elif [ -f /etc/gentoo-release ];
then
OS='Gentoo'
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/GENTOO2011
sh /usr/src/menu.sh
else OS='Slackware'
OSV=`cat /etc/slackware-version | awk '{print $2}' | cut -d "." -f1`
if [ $OSV = 12 ]
then
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/SLACKWARE12
sh /usr/src/menu.sh
else
wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/SLACKWARE13
sh /usr/src/menu.sh
fi
fi
复制代码
作者:
Mr.Ra1n
时间:
2012-2-9 11:05
本帖最后由 Mr.Ra1n 于 2012-2-9 11:05 编辑
看不懂看不懂。。
其实我真的不知道这脚本干嘛用的。。。
作者:
用户名
时间:
2012-2-9 11:09
哦耶
作者:
一手好湿
时间:
2012-2-9 11:26
干嘛用的?
作者:
bearqq
时间:
2012-2-9 11:30
http://vpsrepo.a2hosting.com/semi/DEBIAN6
看看就知道干嘛用的了
作者:
chaoren521
时间:
2012-2-9 11:35
哈哈
作者:
lazyzhu
时间:
2012-2-9 11:38
本帖最后由 lazyzhu 于 2012-2-9 11:39 编辑
楼主,你的是最新的?
作者:
lazyzhu
时间:
2012-2-9 11:38
最新的是 /usr/sbin/quickinstaller.sh
有选项 9的, 可以安装openvpn的
作者:
cquyf
时间:
2012-2-9 11:40
不知道干啥
作者:
acalbert
时间:
2012-2-9 11:42
标记~~~~~
作者:
百度
时间:
2012-2-9 11:42
安装程序的啊
作者:
sunsea
时间:
2012-2-9 11:48
对啊,这个是做什么用的...
看代码好累的说啊
作者:
chaoren521
时间:
2012-2-9 12:52
找个vps测试一下就知道了
作者:
有个就好
时间:
2012-2-9 13:18
确实不错
作者:
零维
时间:
2012-2-9 13:53
收藏+1
作者:
用户名
时间:
2012-2-9 14:01
lazyzhu 发表于 2012-2-9 11:38
最新的是 /usr/sbin/quickinstaller.sh 有选项 9的, 可以安装openvpn的
求最新
欢迎光临 全球主机交流论坛 (https://loc.010206.xyz/)
Powered by Discuz! X3.4