全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1946|回复: 15
打印 上一主题 下一主题

[疑问] A2系统自带的shell不错分享下哈哈

[复制链接]
1#
发表于 2012-2-9 11:26:27 | 只看该作者
干嘛用的?
2#
发表于 2012-2-9 11:09:23 来自手机 | 只看该作者
哦耶
3#
 楼主| 发表于 2012-2-9 11:02:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  1. #!/bin/bash -
  2. #===============================================================================
  3. #
  4. #          FILE:  quickinstall.sh
  5. #
  6. #         USAGE:  ./quickinstall.sh
  7. #
  8. #   DESCRIPTION:  Quick Installation of Applications
  9. #
  10. #        AUTHOR: Mark J.
  11. #       COMPANY: A2 Hosting
  12. #       CREATED: 08/04/2011 15:45:46 PM EDT
  13. #      REVISION:  2
  14. #===============================================================================

  15. #set -o nounset                              # Treat unset variables as an error

  16. # Define variables

  17. #Determine OS and menu to provide
  18. echo "Verifying latest menu, please wait..."
  19. if [ -f /etc/redhat-release ];
  20. then
  21.         OS=`cat /etc/redhat-release | awk '{print $1}'`
  22.         if [ $OS = CentOS ]
  23.                 then
  24.                         OSV=`cat /etc/redhat-release | awk '{print $3}' | cut -d "." -f1`
  25.                         if [ $OSV = 5 ]
  26.                                 then
  27.                                         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/CENTOS5
  28.                                         sh /usr/src/menu.sh
  29.                                 else
  30.                                         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/CENTOS6
  31.                                         sh /usr/src/menu.sh
  32.                         fi
  33.         elif [ $OS = Fedora ]
  34.                 then
  35.                         OSV=`cat /etc/redhat-release | awk '{print $3}'`
  36.                         if [ $OSV = 12 ]
  37.                                 then
  38.                                         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/FEDORA12
  39.                                         sh /usr/src/menu.sh
  40.                         elif [ $OSV = 13 ]
  41.                                 then
  42.                                         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/FEDORA13
  43.                                         sh /usr/src/menu.sh
  44.                         elif [ $OSV = 14 ]
  45.                                 then
  46.                                         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/FEDORA14
  47.                                         sh /usr/src/menu.sh
  48.                         else
  49.                                         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/FEDORA15
  50.                                         sh /usr/src/menu.sh
  51.                         fi
  52.         fi       
  53. elif [ -f /etc/lsb-release ];
  54.         then [ OS='Ubuntu' ]
  55.                 OSV=`cat /etc/lsb-release | grep DISTRIB_RELEASE | awk '{print $1}' | cut -d "=" -f2`
  56.                 if [ $OSV = 10.04 ]
  57.                         then
  58.                                 apt-get -qq install wget   > /dev/null 2>&1
  59.                                 wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/UBUNTU104
  60.                                 sh /usr/src/menu.sh
  61.                 elif [ $OSV = 11.04 ]
  62.                         then
  63.                                 apt-get -qq install wget   > /dev/null 2>&1
  64.                                 wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/UBUNTU1104
  65.                                 sh /usr/src/menu.sh
  66.                 else
  67.                         apt-get -qq install wget   > /dev/null 2>&1
  68.                         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/UBUNTU1110
  69.                         sh /usr/src/menu.sh
  70.                 fi
  71. elif [ -f /etc/debian_version ];
  72. then
  73.         OS='Debian'
  74.         OSV=`cat /etc/debian_version | cut -d "." -f1`
  75.                 if [ $OSV = 5 ]  > /dev/null 2>&1
  76.                         then
  77.                         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/DEBIAN5
  78.                         sh /usr/src/menu.sh
  79.                 else
  80.                         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/DEBIAN6
  81.                         sh /usr/src/menu.sh
  82.                 fi
  83. elif [ -f /etc/gentoo-release ];
  84. then
  85.         OS='Gentoo'
  86.         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/GENTOO2011
  87.         sh /usr/src/menu.sh
  88. else OS='Slackware'
  89.         OSV=`cat /etc/slackware-version | awk '{print $2}' | cut -d "." -f1`
  90.         if [ $OSV = 12 ]
  91.                 then
  92.                         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/SLACKWARE12
  93.                         sh /usr/src/menu.sh
  94.                 else
  95.                         wget -qO /usr/src/menu.sh http://vpsrepo.a2hosting.com/semi/SLACKWARE13
  96.                         sh /usr/src/menu.sh
  97.         fi
  98. fi
复制代码

评分

参与人数 1威望 +10 收起 理由
nbahost.com + 10 很给力!

查看全部评分

4#
发表于 2012-2-9 11:05:13 | 只看该作者
本帖最后由 Mr.Ra1n 于 2012-2-9 11:05 编辑

看不懂看不懂。。
其实我真的不知道这脚本干嘛用的。。。
5#
发表于 2012-2-9 11:30:49 | 只看该作者
http://vpsrepo.a2hosting.com/semi/DEBIAN6
看看就知道干嘛用的了
6#
 楼主| 发表于 2012-2-9 11:35:59 | 只看该作者
哈哈
7#
发表于 2012-2-9 11:38:00 | 只看该作者
本帖最后由 lazyzhu 于 2012-2-9 11:39 编辑

楼主,你的是最新的?
8#
发表于 2012-2-9 11:38:55 | 只看该作者
最新的是 /usr/sbin/quickinstaller.sh
有选项 9的, 可以安装openvpn的
9#
发表于 2012-2-9 11:40:52 | 只看该作者
不知道干啥
10#
发表于 2012-2-9 11:42:03 来自手机 | 只看该作者
标记~~~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-10 00:27 , Processed in 0.120553 second(s), 17 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表