pulseaudio-dlna-service/install.sh

20 lines
483 B
Bash
Raw Normal View History

2022-03-14 22:06:45 +01:00
#!/usr/bin/env bash
run_directory=$(dirname $(readlink -f "$0"))
2022-03-17 15:07:16 +01:00
if [ -f $run_directory/.disabled ]; then
echo "Installation is disabled. Exiting..."
exit 0
fi
2022-03-14 22:06:45 +01:00
echo "Copying Systemd units to user's directory..."
2022-03-17 15:07:16 +01:00
cp $run_directory/pulseaudio-dlna.service $HOME/.config/systemd/user/
2022-03-14 22:06:45 +01:00
echo "Reloading Systemd's user runtime..."
systemctl --user daemon-reload
echo "Enabling service..."
systemctl --user enable pulseaudio-dlna.service
echo "Finished install. Exiting..."
exit 0