Skip to content

Commit

Permalink
Update cozycast-worker to ubuntu 20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Vorlent committed Sep 24, 2022
1 parent 2140e80 commit 514fffc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cozycast-worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:20.04
ENV REPO="xenial"

RUN export DEBIAN_FRONTEND=noninteractive && \
Expand Down
2 changes: 1 addition & 1 deletion cozycast-worker/capture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -f "/home/cozycast/ffmpeg.pid" ]; then
rm /home/cozycast/ffmpeg.pid
fi

ffmpeg $OPTIONS &
sudo -u cozycast ffmpeg $OPTIONS &

FFMPEG_PID=$!
echo "$FFMPEG_PID" >> /home/cozycast/ffmpeg.pid
Expand Down
7 changes: 7 additions & 0 deletions cozycast-worker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ else
gpasswd -a ${UNAME} audio
fi

# run dbus for pulseaudio
mkdir -p /var/run/dbus
dbus-uuidgen > /var/lib/dbus/machine-id
dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address

sudo -u cozycast pulseaudio --start

export DISPLAY=":$RANDOM"
sudo chown cozycast:cozycast /home/cozycast

Expand Down
1 change: 1 addition & 0 deletions cozycast-worker/worker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ local pressed_keys = {}

function wait_for_pulseaudio()
while true do
print("wait_for_pulseaudio ")
local pgrep = io.popen('pgrep "pulseaudio" -c', 'r')
local stdout = pgrep:read("*a")
local count = tonumber(stdout)
Expand Down

0 comments on commit 514fffc

Please sign in to comment.