fix: update to CentOS 8
This commit is contained in:
parent
6c4b1b5e71
commit
194682d89c
7 changed files with 71 additions and 43 deletions
19
install
19
install
|
@ -624,6 +624,7 @@ is_ubuntu_bionic=false
|
|||
is_ubuntu_xenial=false
|
||||
is_centos_dist=false
|
||||
is_centos_7=false
|
||||
is_centos_8=false
|
||||
# Use specified distribution and release or detected otherwise.
|
||||
dist="${dist:-$ID}"
|
||||
code="${code:-$VERSION_ID}"
|
||||
|
@ -682,9 +683,9 @@ case "${dist}-${code}" in
|
|||
echo -e "The LibreTime installer dropped support for installing LibreTime on Wheezy in 3.0.0-alpha.6." >&2
|
||||
exit 1
|
||||
;;
|
||||
centos-7)
|
||||
centos-8)
|
||||
is_centos_dist=true
|
||||
is_centos_7=true
|
||||
is_centos_8=true
|
||||
;;
|
||||
*)
|
||||
echo -e "ERROR: Distribution \"$PRETTY_NAME\" is not supported with \"${dist}-${code}\"!" >&2
|
||||
|
@ -697,10 +698,12 @@ verbose "Using distribution id \"$dist\", release code \"$code\""
|
|||
systemInitDetect
|
||||
|
||||
if $is_centos_dist; then
|
||||
python_bin="python3"
|
||||
apache_bin="httpd"
|
||||
apache_service="httpd"
|
||||
web_user="${web_user:-apache}"
|
||||
else
|
||||
python_bin="python"
|
||||
apache_bin="apache2ctl"
|
||||
apache_service="apache2"
|
||||
web_user="${web_user:-www-data}"
|
||||
|
@ -957,11 +960,11 @@ loud "\n-----------------------------------------------------"
|
|||
loud " * Installing Airtime Services * "
|
||||
loud "-----------------------------------------------------"
|
||||
|
||||
python_version=$(python3 --version 2>&1 | awk '{ print $2 }')
|
||||
python_version=$($python_bin --version 2>&1 | awk '{ print $2 }')
|
||||
verbose "Detected Python version: $python_version"
|
||||
|
||||
verbose "\n * Installing necessary python services..."
|
||||
loudCmd "pip3 install setuptools --upgrade"
|
||||
loudCmd "$python_bin -mpip install setuptools --upgrade"
|
||||
verbose "...Done"
|
||||
|
||||
verbose "\n * Creating /run/airtime..."
|
||||
|
@ -984,11 +987,11 @@ if [ ! -d /var/log/airtime ]; then
|
|||
fi
|
||||
|
||||
verbose "\n * Installing API client..."
|
||||
loudCmd "python3 ${AIRTIMEROOT}/python_apps/api_clients/setup.py install --install-scripts=/usr/bin"
|
||||
loudCmd "$python_bin ${AIRTIMEROOT}/python_apps/api_clients/setup.py install --install-scripts=/usr/bin"
|
||||
verbose "...Done"
|
||||
|
||||
verbose "\n * Installing pypo and liquidsoap..."
|
||||
loudCmd "python3 ${AIRTIMEROOT}/python_apps/pypo/setup.py install --install-scripts=/usr/bin --no-init-script"
|
||||
loudCmd "$python_bin ${AIRTIMEROOT}/python_apps/pypo/setup.py install --install-scripts=/usr/bin --no-init-script"
|
||||
loudCmd "mkdir -p /var/log/airtime/{pypo,pypo-liquidsoap} /var/tmp/airtime/pypo/{cache,files,tmp} /var/tmp/airtime/show-recorder/"
|
||||
loudCmd "chown -R ${web_user}:${web_user} /var/log/airtime/{pypo,pypo-liquidsoap} /var/tmp/airtime/pypo/{cache,files,tmp} /var/tmp/airtime/show-recorder/"
|
||||
systemInitInstall libretime-liquidsoap $web_user
|
||||
|
@ -996,7 +999,7 @@ systemInitInstall libretime-playout $web_user
|
|||
verbose "...Done"
|
||||
|
||||
verbose "\n * Installing airtime-celery..."
|
||||
loudCmd "python3 ${AIRTIMEROOT}/python_apps/airtime-celery/setup.py install --no-init-script"
|
||||
loudCmd "$python_bin ${AIRTIMEROOT}/python_apps/airtime-celery/setup.py install --no-init-script"
|
||||
# Create the Celery user
|
||||
if $is_centos_dist; then
|
||||
loudCmd "id celery 2>/dev/null || adduser --no-create-home -c 'LibreTime Celery' -r celery || true"
|
||||
|
@ -1012,7 +1015,7 @@ systemInitInstall libretime-celery
|
|||
verbose "...Done"
|
||||
|
||||
verbose "\n * Installing airtime_analyzer..."
|
||||
loudCmd "python3 ${AIRTIMEROOT}/python_apps/airtime_analyzer/setup.py install --install-scripts=/usr/bin --no-init-script"
|
||||
loudCmd "$python_bin ${AIRTIMEROOT}/python_apps/airtime_analyzer/setup.py install --install-scripts=/usr/bin --no-init-script"
|
||||
systemInitInstall libretime-analyzer $web_user
|
||||
verbose "...Done"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue