From 76711c1b1065b993121b4e979c8a1e0432209cf9 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Sat, 25 Jul 2015 10:29:44 +0100
Subject: [PATCH] start a source at the end of the Vagrant setup

---
 vagrant-test/Vagrantfile  | 3 +++
 vagrant-test/start-source | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/vagrant-test/Vagrantfile b/vagrant-test/Vagrantfile
index c0509dd0..0f6a42fb 100644
--- a/vagrant-test/Vagrantfile
+++ b/vagrant-test/Vagrantfile
@@ -79,6 +79,9 @@ Vagrant.configure(API_VERSION) do |config|
     # Create a test mountpoint.
     m.vm.provision "shell",
       inline: "sleep 3 && radioctl create-mount /stream.ogg"
+
+    # Start streaming.
+    m.vm.provision "shell", path: "start-source"
   end
 
 end
diff --git a/vagrant-test/start-source b/vagrant-test/start-source
index 82bb5d87..c6474a29 100755
--- a/vagrant-test/start-source
+++ b/vagrant-test/start-source
@@ -3,7 +3,7 @@
 # Stream data to the test mountpoint, using 'ices2'.
 #
 
-stream=/stream.ogg
+stream=${1:-/stream.ogg}
 
 # Download a couple of test songs.
 for song in song1.ogg song2.ogg ; do
@@ -29,4 +29,4 @@ cat > /tmp/ices-playlist.txt <<EOF
 EOF
 
 cd /tmp
-ices2 /tmp/ices.xml
+ices2 /tmp/ices.xml >/tmp/ices.log 2>&1 &
-- 
GitLab