mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Release 2.0.12
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user