Skip to content

Commit

Permalink
install jamulus from repo packages
Browse files Browse the repository at this point in the history
  • Loading branch information
kdoren committed Dec 23, 2020
1 parent 70e6617 commit 38dedde
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions stage3/06-install-jamulus/00-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jamulus
16 changes: 11 additions & 5 deletions stage3/06-install-jamulus/01-run.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Install desktop shortcuts.
cp files/Jamulus_r3_6_1 ${ROOTFS_DIR}/usr/local/bin/Jamulus
chmod +x ${ROOTFS_DIR}/usr/local/bin/Jamulus
mkdir -p ${ROOTFS_DIR}/usr/local/share/icons/hicolor/512x512/apps
cp files/jamulus.png ${ROOTFS_DIR}/usr/local/share/icons/hicolor/512x512/apps/jamulus.png
mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/lxsession/LXDE-pi
cp files/autostart ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/lxsession/LXDE-pi/autostart
cp files/jackdrc ${ROOTFS_DIR}/etc/jackdrc
Expand Down Expand Up @@ -34,7 +30,7 @@ if [[ -n "$CUSTOM_VERSION" ]]; then
cp files/jamulus_start.conf ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/Jamulus/
cp files/jamulus_start.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/
fi
if [[ -f files/${CUSTOM_VERSION}/Jamulus_jns.ini ]]; then
if [[ -f files/${CUSTOM_VERSION}/Jamulus.ini ]]; then
cp files/${CUSTOM_VERSION}/Jamulus.ini ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/Jamulus/
cp files/${CUSTOM_VERSION}/Jamulus.ini ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/
else
Expand All @@ -57,3 +53,13 @@ else
cp files/Jamulus.ini ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/Jamulus/
cp files/Jamulus.ini ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/
fi

# install jamulus-server files (binary is same as jamulus client)
cp files/jamulus-server.service ${ROOTFS_DIR}/usr/lib/systemd/system/
cp files/jamulus-server.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/
mkdir -p ${ROOTFS_DIR}/var/recordings

on_chroot << EOF
chown ${FIRST_USER_NAME} /var/recordings
chgrp audio /var/recordings
EOF
4 changes: 2 additions & 2 deletions stage3/06-install-jamulus/files/jamulus_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ fi

# start Jamulus with --nojackconnect option if aj-snapshot is controlling the connections.
if [ -n "$JAMULUS_SERVER" ]; then
timeout $JAMULUS_TIMEOUT Jamulus $JACKARG -c $JAMULUS_SERVER
timeout $JAMULUS_TIMEOUT nice -n -18 jamulus $JACKARG -c $JAMULUS_SERVER
RESULT=$?
# shutdown if ended due to timeout
[[ "$RESULT" != "0" ]] && sudo shutdown now
else
Jamulus $JACKARG
nice -n -18 jamulus $JACKARG
fi
kill $! # kill aj-snapshot background process
exit 0

0 comments on commit 38dedde

Please sign in to comment.