source: remctl/lib/gutenbach/volume-zephyr @ 9c0279e

debianmacno-cupsweb
Last change on this file since 9c0279e was 9c0279e, checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago

Create Makefiles and fix install scripts.

  • Property mode set to 100755
File size: 1.3 KB
Line 
1#!/bin/sh
2PATH="$(dirname $0):$PATH"
3class=$(/usr/lib/gutenbach/gutenbach-get-config zephyr-class)
4host=$(/usr/lib/gutenbach/gutenbach-get-config host)
5queue=$(/usr/lib/gutenbach/gutenbach-get-config queue)
6instance="$queue-volume@$host"
7
8mixer=$(/usr/lib/gutenbach/gutenbach-get-config mixer)
9channel=$(/usr/lib/gutenbach/gutenbach-get-config channel)
10
11echo "Class: $class" >> /tmp/gutenbach-remctl.log
12echo "Host: $host" >> /tmp/gutenbach-remctl.log
13echo "Queue: $queue" >> /tmp/gutenbach-remctl.log
14echo "Instance: $instance" >> /tmp/gutenbach-remctl.log
15echo "Mixer: $mixer" >> /tmp/gutenbach-remctl.log
16echo "Channel: $channel" >> /tmp/gutenbach-remctl.log
17
18muted=$(volume-is-muted)
19mute_str=" [$muted]"
20if [ "$muted" = "unmuted" ]; then
21    mute_str=""
22fi
23
24start-stop-daemon --stop --oknodo --pidfile /usr/lib/gutenbach/gutenbach-zephyr >/dev/null 2>&1
25start-stop-daemon --start --pidfile /usr/lib/gutenbach/gutenbach-zephyr --make-pidfile --background --exec /bin/sh -- -c "sleep 10 && zwrite -c $class -i $instance -d -n -m 'volume changed to $(volume-get)$mute_str' > /dev/null" >/dev/null 2>&1
26
27echo "sleep 10 && zwrite -c $class -i $instance -d -n -m 'volume changed to $(volume-get)$mute_str' > /dev/null" >> /tmp/gutenbach-remctl.log
28echo "" >> /tmp/gutenbach-remctl.log
Note: See TracBrowser for help on using the repository browser.