feat: startingpoint modules (#33)
* feat: add startingpoint modules some modules authored by @gerblesh original source: https://github.com/ublue-os/startingpoint/pull/135 * docs: better readme for modules dir * docs: yafti deps * docs: sp more information * feat: startingpoint modules in container * docs: sentence structure, check sidebar
This commit is contained in:
parent
288945331e
commit
7c4dd1553e
21 changed files with 408 additions and 0 deletions
35
modules/systemd/systemd.sh
Normal file
35
modules/systemd/systemd.sh
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Tell build process to exit if there are any errors.
|
||||
set -oue pipefail
|
||||
|
||||
get_yaml_array ENABLED '.system.enabled[]' "$1"
|
||||
get_yaml_array DISABLED '.system.disabled[]' "$1"
|
||||
get_yaml_array USER_ENABLED '.user.enabled[]' "$1"
|
||||
get_yaml_array USER_DISABLED '.user.disabled[]' "$1"
|
||||
|
||||
|
||||
if [[ ${#ENABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${ENABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl enable $unit
|
||||
done
|
||||
fi
|
||||
if [[ ${#DISABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${DISABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl disable $unit
|
||||
done
|
||||
fi
|
||||
if [[ ${#USER_ENABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${ENABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl --user enable $unit
|
||||
done
|
||||
fi
|
||||
if [[ ${#USER_DISABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${DISABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl --user disable $unit
|
||||
done
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue