diff options
Diffstat (limited to 'configs/party-mode/spawn_mp3blaster')
-rwxr-xr-x | configs/party-mode/spawn_mp3blaster | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configs/party-mode/spawn_mp3blaster b/configs/party-mode/spawn_mp3blaster new file mode 100755 index 0000000..05a8b91 --- /dev/null +++ b/configs/party-mode/spawn_mp3blaster @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ `id -u` -ne 0 ]; then + echo "$0: run with sudo $0" >&2 + exit 1 +fi +SD_USER="${SUDO_USER}" +if [ "x${SD_USER}" = "x" ]; then + echo "$0: run with sudo $0" >&2 + exit 2 +fi +export SD_USER +openvt -l -s -- su -l ${SD_USER} -s /usr/bin/padsp /usr/bin/mp3blaster |