forked from MayaPosch/NymphCast
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_linux.sh
More file actions
executable file
·27 lines (21 loc) · 861 Bytes
/
Copy pathinstall_linux.sh
File metadata and controls
executable file
·27 lines (21 loc) · 861 Bytes
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
#!/bin/sh
# NymphCast installer for the Linux platform.
# Requires that the binaries have been compiled with the 'setup.sh' script first.
TARGET_FOLDER="/opt/nymphcast"
# Check for the presence of the target folder
if [ -f "${TARGET_FOLDER}" ]; then
echo "Existing NymphCast folder found. Upgrading..."
else
sudo mkdir -p "${TARGET_FOLDER}"
fi
# Copy the files to the target folder.
sudo cp -r src/server/bin/* "${TARGET_FOLDER}"
# Install systemd or openrc service.
if [ -d "/run/systemd/system" ]; then
sudo cp src/server/systemd/nymphcast.service /etc/systemd/system/.
sudo ln -s /etc/systemd/system/nymphcast.service /etc/systemd/system/multi-user.target.wants/nymphcast.service
else
sudo cp src/server/openrc/nymphcast /etc/init.d/nymphcast
fi
# Install Avahi service.
sudo install -m666 src/server/avahi/nymphcast.service /etc/avahi/services/.