mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Release 2.0.12
This commit is contained in:
parent
72d99a1121
commit
df149583d3
14
.github/workflows/apt.yml
vendored
14
.github/workflows/apt.yml
vendored
@ -1,5 +1,15 @@
|
|||||||
name: Hyperion APT Build
|
name: Hyperion APT Build
|
||||||
on: [workflow_call]
|
on:
|
||||||
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
APT_GPG:
|
||||||
|
required: true
|
||||||
|
APT_USER:
|
||||||
|
required: true
|
||||||
|
APT_PASSWORD:
|
||||||
|
required: true
|
||||||
|
APT_DRAFT:
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
@ -93,7 +103,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Include artifacts into the package source
|
- name: Include artifacts into the package source
|
||||||
run: |
|
run: |
|
||||||
for file in artifact/*.deb; do
|
for file in artifact/hyperion_*.deb; do
|
||||||
if [ -f "$file" ]; then
|
if [ -f "$file" ]; then
|
||||||
dist=${file#*~}
|
dist=${file#*~}
|
||||||
dist=${dist%_*}
|
dist=${dist%_*}
|
||||||
|
8
.github/workflows/pull-request.yml
vendored
8
.github/workflows/pull-request.yml
vendored
@ -199,11 +199,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: windows
|
name: windows
|
||||||
path: windows
|
path: windows
|
||||||
|
|
||||||
##########################
|
|
||||||
###### APT workflow ######
|
|
||||||
##########################
|
|
||||||
|
|
||||||
apt_build:
|
|
||||||
name: APT Build
|
|
||||||
uses: hyperion-project/hyperion.ng/.github/workflows/apt.yml@master
|
|
||||||
|
5
.github/workflows/push-master.yml
vendored
5
.github/workflows/push-master.yml
vendored
@ -201,3 +201,8 @@ jobs:
|
|||||||
name: APT Build
|
name: APT Build
|
||||||
needs: [Linux, macOS, windows]
|
needs: [Linux, macOS, windows]
|
||||||
uses: hyperion-project/hyperion.ng/.github/workflows/apt.yml@master
|
uses: hyperion-project/hyperion.ng/.github/workflows/apt.yml@master
|
||||||
|
secrets:
|
||||||
|
APT_GPG: ${{ secrets.APT_GPG }}
|
||||||
|
APT_USER: ${{ secrets.APT_USER }}
|
||||||
|
APT_PASSWORD: ${{ secrets.APT_PASSWORD }}
|
||||||
|
APT_DRAFT: ${{ secrets.APT_DRAFT }}
|
||||||
|
@ -36,9 +36,6 @@ BOOT_BERRYBOOT=$(grep -m1 -c '\(/var/media\|/media/pi\)/berryboot' /etc/mtab)
|
|||||||
#get current system ip
|
#get current system ip
|
||||||
NET_IP=`hostname -I | cut -d " " -f1`
|
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=""
|
START_MSG=""
|
||||||
|
|
||||||
# service registration if no gui is present (only on initial installation and not upgrade)
|
# service registration if no gui is present (only on initial installation and not upgrade)
|
||||||
@ -50,6 +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'` || "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}"
|
||||||
@ -78,6 +76,11 @@ else
|
|||||||
if [ -z "${DISPLAY}" ] && [ -z "${WAYLAND_DISPLAY}" ] && [ -z "${XDG_CURRENT_DESKTOP}" ]; then
|
if [ -z "${DISPLAY}" ] && [ -z "${WAYLAND_DISPLAY}" ] && [ -z "${XDG_CURRENT_DESKTOP}" ]; then
|
||||||
#cleanup service files also on upgrade (non gui user)
|
#cleanup service files also on upgrade (non gui user)
|
||||||
rm -r /usr/share/hyperion/service 2>/dev/null
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -2,26 +2,29 @@
|
|||||||
|
|
||||||
echo "---Hyperion ambient light preinst ---"
|
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
|
# stop running daemon before we install/upgrade
|
||||||
if pgrep hyperiond > /dev/null 2>&1
|
if pgrep hyperiond > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
if grep -m1 systemd /proc/1/comm > /dev/null
|
if grep -m1 systemd /proc/1/comm > /dev/null
|
||||||
then
|
then
|
||||||
echo "--> stop init deamon: systemd"
|
|
||||||
# systemd
|
# systemd
|
||||||
systemctl stop hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" "hyperiond@root" "hyperion@root" 2> /dev/null
|
echo "--> stop init deamon: systemd"
|
||||||
|
CURRENT_SERVICE=$(systemctl list-units --all | { grep -o "hyperion*.*\.service" || true; })
|
||||||
|
if [ ! -z ${CURRENT_SERVICE} ]; then
|
||||||
|
systemctl stop "${CURRENT_SERVICE}" 2> /dev/null
|
||||||
|
else
|
||||||
|
FOUND_USR=`who | grep -o -m1 '^\w*\b'` || "root"
|
||||||
|
systemctl stop hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" "hyperiond@root" "hyperion@root" 2> /dev/null
|
||||||
|
fi
|
||||||
elif [ -e /sbin/initctl ]
|
elif [ -e /sbin/initctl ]
|
||||||
then
|
then
|
||||||
echo "--> stop init deamon: upstart"
|
|
||||||
# upstart
|
# upstart
|
||||||
|
echo "--> stop init deamon: upstart"
|
||||||
initctl stop hyperiond 2>/dev/null
|
initctl stop hyperiond 2>/dev/null
|
||||||
initctl stop hyperion 2>/dev/null
|
initctl stop hyperion 2>/dev/null
|
||||||
else
|
else
|
||||||
echo "--> stop init deamon: sysV"
|
|
||||||
# sysV
|
# sysV
|
||||||
|
echo "--> stop init deamon: sysV"
|
||||||
service hyperiond stop 2>/dev/null
|
service hyperiond stop 2>/dev/null
|
||||||
service hyperion stop 2>/dev/null
|
service hyperion stop 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
@ -9,7 +9,7 @@ if [ "$2" = "in-favour" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Don't clean-up just for an upgrade.`
|
# Don't clean-up just for an upgrade.`
|
||||||
if [ "$action" = "upgrade" ] ; then
|
if [ "$UPGRADE" = "upgrade" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -22,18 +22,24 @@ pgrep hyperiond > /dev/null 2>&1 && HYPERION_RUNNING=true
|
|||||||
|
|
||||||
if grep -m1 systemd /proc/1/comm > /dev/null
|
if grep -m1 systemd /proc/1/comm > /dev/null
|
||||||
then
|
then
|
||||||
echo "---> stop init deamon: systemd"
|
|
||||||
# systemd
|
# systemd
|
||||||
$HYPERION_RUNNING && systemctl stop hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" "hyperiond@root" "hyperion@root" 2> /dev/null
|
echo "---> stop init deamon: systemd"
|
||||||
|
CURRENT_SERVICE=$(systemctl list-units --all | { grep -o "hyperion*.*\.service" || true; })
|
||||||
|
if [ ! -z ${CURRENT_SERVICE} ]; then
|
||||||
|
$HYPERION_RUNNING && systemctl stop "${CURRENT_SERVICE}" 2> /dev/null
|
||||||
|
systemctl -q disable "${CURRENT_SERVICE}" 2> /dev/null
|
||||||
|
else
|
||||||
|
$HYPERION_RUNNING && systemctl stop hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" "hyperiond@root" "hyperion@root" 2> /dev/null
|
||||||
|
systemctl -q disable hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" "hyperiond@root" "hyperion@root" 2> /dev/null
|
||||||
|
fi
|
||||||
# disable user specific symlink
|
# disable user specific symlink
|
||||||
echo "---> Disable service and remove entry"
|
echo "---> Disable service and remove entry"
|
||||||
systemctl -q disable hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" "hyperiond@root" "hyperion@root" 2> /dev/null
|
|
||||||
rm -v /etc/systemd/system/hyperion.service /etc/systemd/system/hyperiond@.service /etc/systemd/system/hyperion@.service 2> /dev/null
|
rm -v /etc/systemd/system/hyperion.service /etc/systemd/system/hyperiond@.service /etc/systemd/system/hyperion@.service 2> /dev/null
|
||||||
|
|
||||||
elif [ -e /sbin/initctl ]
|
elif [ -e /sbin/initctl ]
|
||||||
then
|
then
|
||||||
echo "---> stop init deamon: upstart"
|
|
||||||
# upstart
|
# upstart
|
||||||
|
echo "---> stop init deamon: upstart"
|
||||||
$HYPERION_RUNNING && initctl stop hyperiond
|
$HYPERION_RUNNING && initctl stop hyperiond
|
||||||
$HYPERION_RUNNING && initctl stop hyperion
|
$HYPERION_RUNNING && initctl stop hyperion
|
||||||
echo "---> Remove upstart service"
|
echo "---> Remove upstart service"
|
||||||
@ -41,8 +47,8 @@ then
|
|||||||
initctl reload-configuration
|
initctl reload-configuration
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "---> stop init deamon: sysV"
|
|
||||||
# sysV
|
# sysV
|
||||||
|
echo "---> stop init deamon: sysV"
|
||||||
$HYPERION_RUNNING && service hyperiond stop 2> /dev/null
|
$HYPERION_RUNNING && service hyperiond stop 2> /dev/null
|
||||||
$HYPERION_RUNNING && service hyperion stop 2> /dev/null
|
$HYPERION_RUNNING && service hyperion stop 2> /dev/null
|
||||||
echo "---> Remove sysV service"
|
echo "---> Remove sysV service"
|
||||||
|
Loading…
Reference in New Issue
Block a user