mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Systemd changes | root script | URL support for gif effects (#1319)
* Systemd changes and URL option for Gif Effects * Add grayscale to gif effect * WebUI adjustments * Rename version to .version * Copy runHyperionAsRoot.sh to rpi packages * Pack script into all unix packages * Start hyperion only after network is available * Snap builds removed due to poor server connection * Flexible updateHyperionUser.sh * updateHyperionUser script entered in the package * Print help on none sudo execute * Corrected embedded Python location * Replacement for the QWindowsScreen grabWindow function * Updated to latest 2.x mbedtls version 2.27 Co-authored-by: LordGrey <lordgrey.emmel@gmail.com>
This commit is contained in:
33
cmake/package-scripts/preinst
Normal file
33
cmake/package-scripts/preinst
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "---Hyperion ambient light preinst ---"
|
||||
|
||||
# search for users in system, returns first entry
|
||||
FOUND_USR=`who | grep -o -m1 '^\w*\b'` || "root"
|
||||
|
||||
# stop running daemon before we install/upgrade
|
||||
if pgrep hyperiond > /dev/null 2>&1
|
||||
then
|
||||
if grep -m1 systemd /proc/1/comm > /dev/null
|
||||
then
|
||||
echo "--> stop init deamon: systemd"
|
||||
# systemd
|
||||
systemctl stop hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" 2> /dev/null
|
||||
elif [ -e /sbin/initctl ]
|
||||
then
|
||||
echo "--> stop init deamon: upstart"
|
||||
# upstart
|
||||
initctl stop hyperiond 2>/dev/null
|
||||
initctl stop hyperion 2>/dev/null
|
||||
else
|
||||
echo "--> stop init deamon: sysV"
|
||||
# sysV
|
||||
service hyperiond stop 2>/dev/null
|
||||
service hyperion stop 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
# In case we don't use a service kill all instances
|
||||
killall hyperiond 2> /dev/null
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user