0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-03-05 10:48:49 +00:00
Lakka-LibreELEC/packages/addons/service/vdr-addon/source/sleep.d/vdr.power

31 lines
619 B
Plaintext
Raw Normal View History

#!/bin/sh
2018-07-16 20:45:36 +02:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
. /etc/profile
2013-12-21 13:38:26 +02:00
oe_setup_addon service.multimedia.vdr-addon
2013-12-19 13:22:38 +02:00
SERVICE="service.multimedia.vdr-addon.service"
2012-05-12 20:06:44 +02:00
case "$1" in
2013-12-19 13:22:38 +02:00
pre)
if systemctl is-active "$SERVICE" &>/dev/null ; then
systemctl stop "$SERVICE"
for module in $REMOVE_MODULES ; do
rmmod $module
done
fi
2012-05-12 20:06:44 +02:00
;;
2013-12-19 13:22:38 +02:00
post)
if systemctl is-enabled "$SERVICE" &>/dev/null ; then
for module in $REMOVE_MODULES ; do
modprobe $module
done
2013-12-19 13:22:38 +02:00
systemctl start "$SERVICE"
2012-05-12 20:06:44 +02:00
fi
;;
esac
2013-12-21 13:38:26 +02:00