mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
support debian and raspbian
This commit is contained in:
parent
2dcde77b04
commit
37fe08a302
1 changed files with 12 additions and 0 deletions
|
@ -81,6 +81,8 @@ ok_msg "install init.d scripts success"
|
||||||
# install system service
|
# install system service
|
||||||
lsb_release --id|grep "CentOS" >/dev/null 2>&1; os_id_centos=$?
|
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 "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
|
if [[ 0 -eq $os_id_centos ]]; then
|
||||||
ok_msg "install system service for CentOS"
|
ok_msg "install system service for CentOS"
|
||||||
/sbin/chkconfig --add srs && /sbin/chkconfig srs on
|
/sbin/chkconfig --add srs && /sbin/chkconfig srs on
|
||||||
|
@ -91,6 +93,16 @@ elif [[ 0 -eq $os_id_ubuntu ]]; then
|
||||||
update-rc.d srs defaults
|
update-rc.d srs defaults
|
||||||
ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "install system service failed"; exit $ret; fi
|
ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "install system service failed"; exit $ret; fi
|
||||||
ok_msg "install system service success"
|
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
|
else
|
||||||
warn_msg "ignore and donot install system service for `lsb_release --id|awk '{print $3}'`."
|
warn_msg "ignore and donot install system service for `lsb_release --id|awk '{print $3}'`."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue