mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Use SUDO_USER in postinst
This commit is contained in:
parent
85f3f2ed9e
commit
33d8251a8d
@ -47,7 +47,7 @@ if [ "$IS_UPGRADE" = false ]; then
|
|||||||
then
|
then
|
||||||
# systemd
|
# systemd
|
||||||
echo "---> init deamon: systemd"
|
echo "---> init deamon: systemd"
|
||||||
FOUND_USR=$(who | grep -o -m1 '^\w*\b' || echo "root")
|
FOUND_USR=${SUDO_USER:-root}
|
||||||
install_file /usr/share/hyperion/service/hyperion.systemd /etc/systemd/system/hyperion@.service
|
install_file /usr/share/hyperion/service/hyperion.systemd /etc/systemd/system/hyperion@.service
|
||||||
systemctl enable hyperion"@${FOUND_USR}".service
|
systemctl enable hyperion"@${FOUND_USR}".service
|
||||||
START_MSG="--> systemctl start hyperion for user ${FOUND_USR}"
|
START_MSG="--> systemctl start hyperion for user ${FOUND_USR}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user