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,7 +5,11 @@ Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
config.vm.box = "ubuntu/trusty64"
|
config.vm.box = "ubuntu/trusty64"
|
||||||
|
|
||||||
config.vm.network "forwarded_port", guest: 80, host:8080
|
# libretime web interface
|
||||||
|
config.vm.network "forwarded_port", guest: 9080, host:9080
|
||||||
|
# icecast2
|
||||||
|
config.vm.network "forwarded_port", guest: 8000, host:8000
|
||||||
|
# mkdics documentation
|
||||||
config.vm.network "forwarded_port", guest: 8888, host:8888
|
config.vm.network "forwarded_port", guest: 8888, host:8888
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |v|
|
config.vm.provider "virtualbox" do |v|
|
||||||
|
@ -13,7 +17,7 @@ Vagrant.configure("2") do |config|
|
||||||
v.memory = 1024
|
v.memory = 1024
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.provision "shell", inline: "cd /vagrant; ./install -fIap"
|
config.vm.provision "shell", inline: "cd /vagrant; ./install -fIapv --web-port=9080"
|
||||||
config.vm.provision "shell", path: "docs/scripts/install.sh"
|
config.vm.provision "shell", path: "docs/scripts/install.sh"
|
||||||
config.vm.provision "shell", path: "docs/scripts/serve.sh"
|
config.vm.provision "shell", path: "docs/scripts/serve.sh"
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,6 @@ The easiest way to check out LibreTime for yourself is to run a local instance i
|
||||||
cd libretime
|
cd libretime
|
||||||
vagrant up
|
vagrant up
|
||||||
|
|
||||||
If everything works out, you will find LibreTime on [port 8080](http://localhost:8080) and the docs on [port 8888](http://localhost:8888).
|
If everything works out, you will find LibreTime on [port 9080](http://localhost:9080), icecast on [port 8080](http://localhost:8080) and the docs on [port 8888](http://localhost:8888).
|
||||||
|
|
||||||
Of course, this setup isn't appropriate for production use. For that, check out our [installation instructions](install.md).
|
Of course, this setup isn't appropriate for production use. For that, check out our [installation instructions](install.md).
|
||||||
|
|
34
install
34
install
|
@ -36,6 +36,8 @@ showhelp () {
|
||||||
This will copy the Airtime application files, but you will need
|
This will copy the Airtime application files, but you will need
|
||||||
to give your web user access to the given directory if it is
|
to give your web user access to the given directory if it is
|
||||||
not accessible
|
not accessible
|
||||||
|
--web-port=WEB_PORT
|
||||||
|
Set what port the LibreTime interface should run on.
|
||||||
-I, --in-place
|
-I, --in-place
|
||||||
Set the current Airtime directory as the web root
|
Set the current Airtime directory as the web root
|
||||||
Note that you will need to give your web user permission to
|
Note that you will need to give your web user permission to
|
||||||
|
@ -58,6 +60,7 @@ showversion () {
|
||||||
|
|
||||||
web_user="www-data"
|
web_user="www-data"
|
||||||
web_root=""
|
web_root=""
|
||||||
|
web_port="80"
|
||||||
in_place="f"
|
in_place="f"
|
||||||
postgres="f"
|
postgres="f"
|
||||||
apache="f"
|
apache="f"
|
||||||
|
@ -206,6 +209,17 @@ while :; do
|
||||||
echo 'ERROR: Must specify a non-empty "--web-root=WEB_ROOT" argument.' >&2
|
echo 'ERROR: Must specify a non-empty "--web-root=WEB_ROOT" argument.' >&2
|
||||||
exit 1
|
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
|
shift
|
||||||
break
|
break
|
||||||
|
@ -420,12 +434,22 @@ if [ "$apache" = "t" ]; then
|
||||||
# will fail
|
# will fail
|
||||||
if [ "$upgrade" = "t" -o ! -f /etc/apache2/sites-available/${airtimeconfigfile} ]; then
|
if [ "$upgrade" = "t" -o ! -f /etc/apache2/sites-available/${airtimeconfigfile} ]; then
|
||||||
verbose "\n * Creating Apache config for Airtime..."
|
verbose "\n * Creating Apache config for Airtime..."
|
||||||
|
listen_port=""
|
||||||
if [ "$apacheversion" != "1" ]; then
|
if [ "$web_port" != "80" ]; then
|
||||||
sed -e "s@WEB_ROOT@${web_root}@g" ${SCRIPT_DIR}/installer/apache/airtime-vhost-2.4 > /etc/apache2/sites-available/${airtimeconfigfile}
|
listen_port=${web_port}
|
||||||
else
|
|
||||||
sed -e "s@WEB_ROOT@${web_root}@g" ${SCRIPT_DIR}/installer/apache/airtime-vhost > /etc/apache2/sites-available/${airtimeconfigfile}
|
|
||||||
fi
|
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"
|
loudCmd "a2dissite 000-default"
|
||||||
# If Airtime was previously installed with apt, the vhost file name is different,
|
# If Airtime was previously installed with apt, the vhost file name is different,
|
||||||
# so we need to specifically disable it.
|
# so we need to specifically disable it.
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<VirtualHost *:80>
|
WEB_PORT_LISTEN
|
||||||
|
|
||||||
|
<VirtualHost *:WEB_PORT>
|
||||||
ServerAdmin foo@bar.org
|
ServerAdmin foo@bar.org
|
||||||
DocumentRoot WEB_ROOT
|
DocumentRoot WEB_ROOT
|
||||||
php_admin_value upload_tmp_dir /tmp
|
php_admin_value upload_tmp_dir /tmp
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<VirtualHost *:80>
|
WEB_PORT_LISTEN
|
||||||
|
|
||||||
|
<VirtualHost *:WEB_PORT>
|
||||||
ServerAdmin foo@bar.org
|
ServerAdmin foo@bar.org
|
||||||
DocumentRoot WEB_ROOT
|
DocumentRoot WEB_ROOT
|
||||||
php_admin_value upload_tmp_dir /tmp
|
php_admin_value upload_tmp_dir /tmp
|
||||||
|
|
Loading…
Reference in New Issue