summarylogtreecommitdiffstats
path: root/powertool.install
blob: e5ddf74a34374fb26abf1d9b9d6219a4de216252 (plain)
1
2
3
4
5
6
7
8
9
10
11
post_install() {
    if ! grep /usr/bin/powertool /etc/sudoers 2>&1 > /dev/null; then
        printf "\n%%sudo ALL=(ALL) NOPASSWD: /usr/bin/powertool\n" >> /etc/sudoers
    fi
}

post_remove() {
    sed -i 'N;N;s/\n*%sudo ALL=(ALL) NOPASSWD: \/usr\/bin\/powertool//' /etc/sudoers
}

# vim: ts=4 sts=4 sw=4 et