fix sonarr and create audit

This commit is contained in:
2026-10-27 10:31:00 -06:00
parent 9d2652f053
commit f00865b5ac
7 changed files with 411 additions and 5 deletions
+13 -2
View File
@@ -94,11 +94,22 @@ remove_flatpaks() {
}
# Function to enable systemd services if not already enabled
# With --now, also start the services enabled here, after making systemd read
# the unit files that packages just installed
enable_services() {
local now=()
if [ "$1" = "--now" ]; then
now=(--now)
shift
sudo systemctl daemon-reload
fi
for service in "$@"; do
if ! systemctl is-enabled "$service" &> /dev/null; then
# audit records the services you turn off; leave those off
if grep -qsx "system $service" "$HOME/.config/coredesktop/services-off"; then
echo "$service is turned off (see audit)."
elif ! systemctl is-enabled "$service" &> /dev/null; then
echo "Enabling $service..."
sudo systemctl enable "$service"
sudo systemctl enable "${now[@]}" "$service"
else
echo "$service is already enabled."
fi