正在显示
1 个修改的文件
包含
12 行增加
和
0 行删除
| @@ -81,6 +81,8 @@ ok_msg "install init.d scripts success" | @@ -81,6 +81,8 @@ ok_msg "install init.d scripts success" | ||
| 81 | # install system service | 81 | # install system service |
| 82 | lsb_release --id|grep "CentOS" >/dev/null 2>&1; os_id_centos=$? | 82 | lsb_release --id|grep "CentOS" >/dev/null 2>&1; os_id_centos=$? |
| 83 | lsb_release --id|grep "Ubuntu" >/dev/null 2>&1; os_id_ubuntu=$? | 83 | lsb_release --id|grep "Ubuntu" >/dev/null 2>&1; os_id_ubuntu=$? |
| 84 | +lsb_release --id|grep "Debian" >/dev/null 2>&1; os_id_debian=$? | ||
| 85 | +lsb_release --id|grep "Raspbian" >/dev/null 2>&1; os_id_rasabian=$? | ||
| 84 | if [[ 0 -eq $os_id_centos ]]; then | 86 | if [[ 0 -eq $os_id_centos ]]; then |
| 85 | ok_msg "install system service for CentOS" | 87 | ok_msg "install system service for CentOS" |
| 86 | /sbin/chkconfig --add srs && /sbin/chkconfig srs on | 88 | /sbin/chkconfig --add srs && /sbin/chkconfig srs on |
| @@ -91,6 +93,16 @@ elif [[ 0 -eq $os_id_ubuntu ]]; then | @@ -91,6 +93,16 @@ elif [[ 0 -eq $os_id_ubuntu ]]; then | ||
| 91 | update-rc.d srs defaults | 93 | update-rc.d srs defaults |
| 92 | ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "install system service failed"; exit $ret; fi | 94 | ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "install system service failed"; exit $ret; fi |
| 93 | ok_msg "install system service success" | 95 | ok_msg "install system service success" |
| 96 | +elif [[ 0 -eq $os_id_debian ]]; then | ||
| 97 | + ok_msg "install system service for Debian" | ||
| 98 | + update-rc.d srs defaults | ||
| 99 | + ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "install system service failed"; exit $ret; fi | ||
| 100 | + ok_msg "install system service success" | ||
| 101 | +elif [[ 0 -eq $os_id_rasabian ]]; then | ||
| 102 | + ok_msg "install system service for RaspberryPi" | ||
| 103 | + update-rc.d srs defaults | ||
| 104 | + ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "install system service failed"; exit $ret; fi | ||
| 105 | + ok_msg "install system service success" | ||
| 94 | else | 106 | else |
| 95 | warn_msg "ignore and donot install system service for `lsb_release --id|awk '{print $3}'`." | 107 | warn_msg "ignore and donot install system service for `lsb_release --id|awk '{print $3}'`." |
| 96 | fi | 108 | fi |
-
请 注册 或 登录 后发表评论