distribution/packages/jelos/sources/autostart/common/099-networkservices
fewtarius 9e72309447
* Fix long standing issue with busybox and bash.
* Move retroarch bits to the retroarch package.
* Add an upgrade script to autostart that executes after upgrades.
2022-03-16 18:03:28 -04:00

35 lines
627 B
Bash
Executable file

#!/bin/sh
# 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
if [ ! -d "/storage/.cache/services" ]
then
mkdir -p "/storage/.cache/services"
fi
if [ -e "/storage/.cache/services/${CONF}" ]
then
rm -f "/storage/.cache/services/${CONF}"
fi
statemgr() {
for daemon in ${DAEMONS[@]}
do
systemctl ${1} ${daemon}
done
}
case "$STATE" in
"1")
touch "/storage/.cache/services/${CONF}"
statemgr start
;;
*)
statemgr stop
;;
esac
done