Skip to content

Commit

Permalink
make autostart configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
kdoren committed Dec 26, 2020
1 parent cb72495 commit 60dcb9a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions stage3/06-install-jamulus/01-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ cp files/Desktop/*.desktop ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop/
cp files/jamulus_start.sh ${ROOTFS_DIR}/usr/local/bin/
chmod +x ${ROOTFS_DIR}/usr/local/bin/jamulus_start.sh

cp files/jambox_start.sh ${ROOTFS_DIR}/usr/local/bin/
chmod +x ${ROOTFS_DIR}/usr/local/bin/jambox_start.sh

mkdir -p ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/Jamulus
mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus

Expand Down
2 changes: 1 addition & 1 deletion stage3/06-install-jamulus/files/autostart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@lxterminal -e /usr/local/bin/jamulus_start.sh
@lxterminal -e /usr/local/bin/jambox_start.sh
17 changes: 17 additions & 0 deletions stage3/06-install-jamulus/files/jambox-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
if [ -f ~/.config/Jamulus/jamulus_start.conf ]; then
source ~/.config/Jamulus/jamulus_start.conf
if [[ "$JAMULUS_AUTOSTART" == '1' ]]; then
jamulus_start.sh
exit 0
fi
fi

if [ -f ~/.config/sonobus_start.conf ]; then
source ~/.config/sonobus_start.conf
if [[ "$SONOBUS_AUTOSTART" == '1' ]]; then
sonobus_start.sh
exit 0
fi
fi

2 changes: 2 additions & 0 deletions stage3/06-install-jamulus/files/jamulus_start.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
#
# Optional configuration parameters for "jamulus_start.sh"
#
# JAMULUS_AUTOSTART=1 # 1=automatically start Jamulus at boot time
# JAMULUS_SERVER=<jamulus_server_dns_name_or_ip> # automatically connect to this server, then shut down after 120 mins. (default unset)
# MASTER_LEVEL=<level%> # force alsamixer master level to this value when starting. (default unset)
# CAPTURE_LEVEL=<level%> # force alsamixer capture level to this value when starting. (default: unset)
# AJ_SNAPSHOT=<snapshot_file_name> # file name of alsa/jack connection snapshot, default: ajs-um2-stereo_only.xml (2 input channels fed separately to Jamulus)
# JAMULUS_TIMEOUT=<timeout> # if auto-connecting to JAMULUS_SERVER, time out and shut down after <timeout> (default "120m")
# JAMULUS_ALSA_DEVICE=<alsa_device> # Alsa card of USB Interface (default "card 2")

JAMULUS_AUTOSTART=1
JAMULUS_SERVER=
MASTER_LEVEL="75%"
CAPTURE_LEVEL="75%"
Expand Down
2 changes: 2 additions & 0 deletions stage3/08-install-sonobus/files/sonobus_start.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
#
# Optional configuration parameters for "sonobus_start.sh"
#
# SONOBUS_AUTOSTART=1 # 1=automatically start SonoBus at boot time
# MASTER_LEVEL=<level%> # force alsamixer master level to this value when starting. (default unset)
# CAPTURE_LEVEL=<level%> # force alsamixer capture level to this value when starting. (default: unset)
# AJ_SNAPSHOT=<snapshot_file_name> # file name of alsa/jack connection snapshot, default: ajs-stereo-sonobus.xml (2 input channels fed separately to SonoBus)
# SONOBUS_ALSA_DEVICE=<alsa_device> # Alsa card of USB Interface (default "card 2")

SONOBUS_AUTOSTART=0
MASTER_LEVEL="75%"
CAPTURE_LEVEL="75%"
AJ_SNAPSHOT=ajs-stereo-sonobus.xml

0 comments on commit 60dcb9a

Please sign in to comment.