Switch LibreTime port to 9080 in vagrant
Also expose icecast and make the airtime port generally configurable from the installer. To aid in debugging and support the -v (verbose) argument was added to the call.
This commit is contained in:
parent
354f449b82
commit
bd2f96acf2
5 changed files with 42 additions and 10 deletions
34
install
34
install
|
@ -36,6 +36,8 @@ showhelp () {
|
|||
This will copy the Airtime application files, but you will need
|
||||
to give your web user access to the given directory if it is
|
||||
not accessible
|
||||
--web-port=WEB_PORT
|
||||
Set what port the LibreTime interface should run on.
|
||||
-I, --in-place
|
||||
Set the current Airtime directory as the web root
|
||||
Note that you will need to give your web user permission to
|
||||
|
@ -58,6 +60,7 @@ showversion () {
|
|||
|
||||
web_user="www-data"
|
||||
web_root=""
|
||||
web_port="80"
|
||||
in_place="f"
|
||||
postgres="f"
|
||||
apache="f"
|
||||
|
@ -206,6 +209,17 @@ while :; do
|
|||
echo 'ERROR: Must specify a non-empty "--web-root=WEB_ROOT" argument.' >&2
|
||||
exit 1
|
||||
;;
|
||||
--web-port)
|
||||
echo 'ERROR: Pleas specify a port number.' >&2
|
||||
exit 1
|
||||
;;
|
||||
--web-port=)
|
||||
echo 'ERROR: Pleas specify a port number.' >&2
|
||||
exit 1
|
||||
;;
|
||||
--web-port=?*)
|
||||
web_port=${1#*=}
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
|
@ -420,12 +434,22 @@ if [ "$apache" = "t" ]; then
|
|||
# will fail
|
||||
if [ "$upgrade" = "t" -o ! -f /etc/apache2/sites-available/${airtimeconfigfile} ]; then
|
||||
verbose "\n * Creating Apache config for Airtime..."
|
||||
|
||||
if [ "$apacheversion" != "1" ]; then
|
||||
sed -e "s@WEB_ROOT@${web_root}@g" ${SCRIPT_DIR}/installer/apache/airtime-vhost-2.4 > /etc/apache2/sites-available/${airtimeconfigfile}
|
||||
else
|
||||
sed -e "s@WEB_ROOT@${web_root}@g" ${SCRIPT_DIR}/installer/apache/airtime-vhost > /etc/apache2/sites-available/${airtimeconfigfile}
|
||||
listen_port=""
|
||||
if [ "$web_port" != "80" ]; then
|
||||
listen_port=${web_port}
|
||||
fi
|
||||
|
||||
apache_template_file=${SCRIPT_DIR}/installer/apache/airtime-vhost-2.4
|
||||
if [ "$apacheversion" = "1" ]; then
|
||||
# fall back to apache 1 config
|
||||
apache_template_file=${SCRIPT_DIR}/installer/apache/airtime-vhost
|
||||
fi
|
||||
sed \
|
||||
-e "s@WEB_PORT_LISTEN@Listen ${listen_port}@g" \
|
||||
-e "s@WEB_PORT@${web_port}@g" \
|
||||
-e "s@WEB_ROOT@${web_root}@g" \
|
||||
${apache_template_file} > /etc/apache2/sites-available/${airtimeconfigfile}
|
||||
|
||||
loudCmd "a2dissite 000-default"
|
||||
# If Airtime was previously installed with apt, the vhost file name is different,
|
||||
# so we need to specifically disable it.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue