distribution/packages/sysutils/autostart/sources/common/099-networkservices
fewtarius 4b9e65325f
* Update kernel and OS to support AyaNeo Air / Air Pro fan control.
* Bump WIFI drivers.
* Add WIFI module quirk and WIFI not waking from sleep on Air.
* Fix splash screen on rotated displays.
* Move autostart to its own package.
2022-12-19 17:14:32 -05:00

38 lines
687 B
Bash
Executable file

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
for SERVICE in /usr/lib/autostart/daemons/*
do
source ${SERVICE}
if [ ! -d "/storage/.cache/services" ]
then
mkdir -p "/storage/.cache/services"
fi
if [ -n "${CONF}" ] && \
[ -e "/storage/.cache/services/${CONF}" ]
then
rm -f "/storage/.cache/services/${CONF}"
fi
statemgr() {
for daemon in ${DAEMONS[@]}
do
nohup systemctl ${1} ${daemon} &
done
}
case "$STATE" in
"1")
touch "/storage/.cache/services/${CONF}"
statemgr start
;;
*)
statemgr stop
;;
esac
done