17 lines
726 B
Bash
Executable File
17 lines
726 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
id "dinnerbell" >/dev/null 2>&1 || useradd --system --no-create-home --shell /usr/sbin/nologin dinnerbell
|
|
usermod -aG audio dinnerbell && \
|
|
mkdir -p /opt/dinnerbell/ && \
|
|
/usr/bin/cp "$SCRIPT_DIR"/dinnerbell.py /opt/dinnerbell/dinnerbell.py && \
|
|
chmod +x /opt/dinnerbell/dinnerbell.py && \
|
|
ln -sf /opt/dinnerbell/dinnerbell.py /usr/bin/dinnerbell && \
|
|
mkdir -p /etc/dinnerbell/audio/ && \
|
|
chown dinnerbell:dinnerbell /etc/dinnerbell/ && \
|
|
chmod 777 /etc/dinnerbell/audio/ && \
|
|
/usr/bin/cp "$SCRIPT_DIR"/dinnerbell.service /etc/systemd/system/dinnerbell.service && \
|
|
systemctl daemon-reload && \
|
|
systemctl restart dinnerbell.service
|