distribution/packages/sysutils/system-utils/sources/autostart/common/008-deviceutils
2023-07-10 04:03:40 +00:00

45 lines
964 B
Bash
Executable file

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
if [ "${DEVICE_HAS_FAN}" == "true" ]
then
tocon "Enabling fan control..."
nohup systemctl start fancontrol &
else
nohup systemctl stop fancontrol &
fi
if [ "${DEVICE_FAKE_JACKSENSE}" == "true" ]
then
tocon "Starting headphone service..."
nohup systemctl start headphones &
else
nohup systemctl stop headphones &
fi
if [ "${DEVICE_VOLUMECTL}" == "true" ]
then
tocon "Starting volume service..."
nohup systemctl start volume &
else
nohup systemctl stop volume &
fi
if [ "${DEVICE_HAS_HDMI}" == "true" ]
then
tocon "Starting hdmi service..."
nohup systemctl start hdmi &
else
nohup systemctl stop hdmi &
fi
if [ "${DEVICE_BATTERY_LED_STATUS}" == "true" ]
then
tocon "Starting battery led status service..."
nohup systemctl start batteryledstatus &
else
nohup systemctl stop batteryledstatus &
fi