2026-01-09 17:01:49 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2026-01-12 12:17:53 +01:00
|
|
|
program_name="akartontv"
|
2026-01-09 17:01:49 +01:00
|
|
|
runtime_id=$(id -u)
|
2026-01-12 12:17:53 +01:00
|
|
|
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
|
2026-01-12 12:17:53 +01:00
|
|
|
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
|
2026-01-12 12:17:53 +01:00
|
|
|
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
|
2026-01-12 12:17:53 +01:00
|
|
|
chown -R ${userland_name}:${userland_name} /opt/${program_name}
|
2026-01-12 16:28:52 +01:00
|
|
|
fi
|