upnp-renderer/setup.sh

26 lines
687 B
Bash
Raw Permalink Normal View History

2022-03-13 13:02:57 +01:00
#!/usr/bin/env bash
2021-11-20 15:15:51 +01:00
run_directory=$(dirname $(readlink -f "$0"))
user=$(whoami)
2021-11-20 15:15:51 +01:00
if [[ $user != 'root' ]]; then
sudo="sudo"
else
sudo=""
2021-11-20 15:15:51 +01:00
fi
echo "Setting custom upmpdcli service unit"
$sudo mkdir /etc/systemd/system/upmpdcli.service.d
$sudo cp $run_directory/exec.conf /etc/systemd/system/upmpdcli.service.d/exec.conf
2021-11-20 15:15:51 +01:00
echo "Setting custom upmpdcli-restart service unit"
$sudo cp $run_directory/restart-upmpdcli.service /etc/systemd/system/
$sudo cp $run_directory/restart-upmpdcli.timer /etc/systemd/system/
$sudo systemctl daemon-reload
$sudo systemctl enable restart-upmpdcli.timer
2021-11-20 15:15:51 +01:00
echo "Setting ALSA configuration"
$sudo cp $run_directory/asound.conf /etc/asound.conf
2021-11-20 15:15:51 +01:00
exit 0