Files
raspscreen/install.sh

25 lines
761 B
Bash
Raw Normal View History

2026-01-09 17:01:49 +01:00
#!/bin/bash
program_name="akartontv"
2026-01-09 17:01:49 +01:00
runtime_id=$(id -u)
userland_name="systemec"
# Check if the user is right (root) for the program
2026-01-09 17:01:49 +01:00
if [[ "$runtime_id" -ne 0 ]]; then
echo "Not running as root, please run as root."
exit 1
fi
apt-get -y install libreoffice-impress ssh vlc
systemctl enable --now ssh
# Create the systemd userland folder
if [[ ! -d /home/${userland_name}/.config/systemd/user ]]; then
2026-01-12 16:28:52 +01:00
mkdir -p /home/${userland_name}/.config/systemd/user -m 755
chown -R ${userland_name}:${userland_name} /home/${userland_name}/.config/systemd/user
fi
# Create the program place onto /opt
if [[ ! -d /opt/${program_name} ]]; then
2026-01-12 16:28:52 +01:00
mkdir -p /opt/${program_name} -m 755
chown -R ${userland_name}:${userland_name} /opt/${program_name}
2026-01-12 16:28:52 +01:00
fi