summarylogtreecommitdiffstats
path: root/systemd-removed-services.sh
blob: 58ce73517ef329749ce36617239dd05eee8d1e05 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

echo
cat | while read -r f; do 
    service="${f##*/}"
    if [ "${f/*\/system\/*/system}" = 'system' ] && systemctl --quiet is-enabled "$service" 2> /dev/null; then
        echo " ► systemctl disable $service"
    elif [ "${f/*\/user\/*/user}" = 'user' ] && systemctl --quiet --global is-enabled "$service" 2> /dev/null; then
        echo " ► systemctl disable --global $service"
    fi
done