blob: 5a1e8882a581ed883ef91d220db2d85ddd224620 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/bash
set -e
echo "Building rsplayer in release mode..."
cargo build --release
echo "Stopping existing daemon..."
systemctl --user stop rsplayer 2>/dev/null || true
rsp stop 2>/dev/null || true
echo "Installing to /usr/bin/rsp..."
sudo cp target/release/rsp /usr/bin/rsp
sudo chmod +x /usr/bin/rsp
echo ""
echo "Installing systemd service..."
mkdir -p ~/.config/systemd/user
cp rsplayer.service ~/.config/systemd/user/
if systemctl --user is-active default.target &>/dev/null; then
systemctl --user daemon-reload
echo "To enable auto-start: systemctl --user enable rsplayer"
else
echo "Service installed but not enabled (no user session running)"
echo "To enable later when logged in: systemctl --user enable rsplayer"
fi
echo ""
echo "Done! Run 'rsp start' to start the daemon."
|