Browse Source

debian 7 /var/lock/subsys: No such directory

lj2007331 9 years ago
parent
commit
a0ae4896ff
4 changed files with 9 additions and 8 deletions
  1. 1 1
      apps.conf
  2. 6 6
      include/check_os.sh
  3. 1 0
      include/pureftpd.sh
  4. 1 1
      install.sh

+ 1 - 1
apps.conf

@@ -1,6 +1,6 @@
 # newest software version
 # Web
-nginx_version=1.8.0
+nginx_version=1.9.3
 tengine_version=2.1.1
 
 tomcat_7_version=7.0.63

+ 6 - 6
include/check_os.sh

@@ -8,17 +8,17 @@
 #       http://oneinstack.com
 #       https://github.com/lj2007331/oneinstack
 
-if [ -f /etc/redhat-release -o -n "`grep 'Aliyun Linux release6 15' /etc/issue`" ];then
+if [ -f /etc/redhat-release -o -n "`grep 'Aliyun Linux release' /etc/issue`" ];then
     OS=CentOS
-    [ -n "$(grep ' 7\.' /etc/redhat-release)" ] && CentOS_RHEL_version=7
-    [ -n "$(grep ' 6\.' /etc/redhat-release)" ] && CentOS_RHEL_version=6
-    [ -n "$(grep ' 5\.' /etc/redhat-release)" ] && CentOS_RHEL_version=5
+    [ -n "`grep ' 7\.' /etc/redhat-release`" ] && CentOS_RHEL_version=7
+    [ -n "`grep ' 6\.' /etc/redhat-release`" -o -n "`grep 'Aliyun Linux release6 15' /etc/issue`" ] && CentOS_RHEL_version=6
+    [ -n "`grep ' 5\.' /etc/redhat-release`" -o -n "`grep 'Aliyun Linux release5' /etc/issue`" ] && CentOS_RHEL_version=5
 elif [ -n "`grep bian /etc/issue`" ];then
     OS=Debian
+    Debian_version=`lsb_release -sr | awk -F. '{print $1}'`
 elif [ -n "`grep Ubuntu /etc/issue`" ];then
     OS=Ubuntu
-    . /etc/lsb-release
-    Ubuntu_version=${DISTRIB_RELEASE%\.*}
+    Ubuntu_version=`lsb_release -sr | awk -F. '{print $1}'`
 else
     echo "${CFAILURE}Does not support this OS, Please contact the author! ${CEND}"
     kill -9 $$

+ 1 - 0
include/pureftpd.sh

@@ -35,6 +35,7 @@ if [ -e "$pureftpd_install_dir/sbin/pure-ftpwho" ];then
     chmod +x /etc/init.d/pureftpd
     OS_CentOS='chkconfig --add pureftpd \n
 chkconfig pureftpd on'
+    [ "$Debian_version" == '7' ] && sed -i 's@/var/lock/subsys/@/var/lock/@g' /etc/init.d/pureftpd 
     OS_Debian_Ubuntu="sed -i 's@^. /etc/rc.d/init.d/functions@. /lib/lsb/init-functions@' /etc/init.d/pureftpd \n
 update-rc.d pureftpd defaults"
     OS_command

+ 1 - 1
install.sh

@@ -47,7 +47,7 @@ do
     if [ "$upgrade_yn" != 'y' -a "$upgrade_yn" != 'n' ];then
         echo "${CWARNING}input error! Please only input 'y' or 'n'${CEND}"
     else
-        [ "$upgrade_yn" == 'y' ] && { echo "${CWARNING}Your system is already upgraded! ${CEND}" ; upgrade_yn=n ; }
+        #[ "$upgrade_status" == '0' ] && { echo "${CWARNING}Your system is already upgraded! ${CEND}" ; upgrade_yn=Other ; }
         break
     fi
 done