From 37fe08a302a3bb353c087370bf4084bfe280c08e Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 30 Mar 2014 11:14:57 +0800 Subject: [PATCH] support debian and raspbian --- trunk/scripts/install.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/trunk/scripts/install.sh b/trunk/scripts/install.sh index 4670d9314..9b3ecbd23 100755 --- a/trunk/scripts/install.sh +++ b/trunk/scripts/install.sh @@ -81,6 +81,8 @@ ok_msg "install init.d scripts success" # install system service lsb_release --id|grep "CentOS" >/dev/null 2>&1; os_id_centos=$? lsb_release --id|grep "Ubuntu" >/dev/null 2>&1; os_id_ubuntu=$? +lsb_release --id|grep "Debian" >/dev/null 2>&1; os_id_debian=$? +lsb_release --id|grep "Raspbian" >/dev/null 2>&1; os_id_rasabian=$? if [[ 0 -eq $os_id_centos ]]; then ok_msg "install system service for CentOS" /sbin/chkconfig --add srs && /sbin/chkconfig srs on @@ -91,6 +93,16 @@ elif [[ 0 -eq $os_id_ubuntu ]]; then update-rc.d srs defaults ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "install system service failed"; exit $ret; fi ok_msg "install system service success" +elif [[ 0 -eq $os_id_debian ]]; then + ok_msg "install system service for Debian" + update-rc.d srs defaults + ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "install system service failed"; exit $ret; fi + ok_msg "install system service success" +elif [[ 0 -eq $os_id_rasabian ]]; then + ok_msg "install system service for RaspberryPi" + update-rc.d srs defaults + ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "install system service failed"; exit $ret; fi + ok_msg "install system service success" else warn_msg "ignore and donot install system service for `lsb_release --id|awk '{print $3}'`." fi