Release 2.0.12

This commit is contained in:
Markus
2021-11-21 13:26:17 +00:00
committed by GitHub
parent 72d99a1121
commit df149583d3
6 changed files with 45 additions and 26 deletions

View File

@@ -36,9 +36,6 @@ BOOT_BERRYBOOT=$(grep -m1 -c '\(/var/media\|/media/pi\)/berryboot' /etc/mtab)
#get current system ip
NET_IP=`hostname -I | cut -d " " -f1`
# search for users in system, returns first entry
FOUND_USR=`who | grep -o -m1 '^\w*\b'` || "root"
START_MSG=""
# service registration if no gui is present (only on initial installation and not upgrade)
@@ -50,6 +47,7 @@ if [ "$IS_UPGRADE" = false ]; then
then
# systemd
echo "---> init deamon: systemd"
FOUND_USR=`who | grep -o -m1 '^\w*\b'` || "root"
install_file /usr/share/hyperion/service/hyperion.systemd /etc/systemd/system/hyperion@.service
systemctl enable hyperion"@${FOUND_USR}".service
START_MSG="--> systemctl start hyperion for user ${FOUND_USR}"
@@ -78,6 +76,11 @@ else
if [ -z "${DISPLAY}" ] && [ -z "${WAYLAND_DISPLAY}" ] && [ -z "${XDG_CURRENT_DESKTOP}" ]; then
#cleanup service files also on upgrade (non gui user)
rm -r /usr/share/hyperion/service 2>/dev/null
#start existing service on upgrade
CURRENT_SERVICE=$(systemctl list-units --all | { grep -o "hyperion*.*\.service" || true; })
if [ ! -z ${CURRENT_SERVICE} ]; then
systemctl start "${CURRENT_SERVICE}"
fi
fi
fi