summarylogtreecommitdiffstats
path: root/lightsd.install
blob: 91570aa8c6f6326eefa875c99bdbb240e3f5526f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
post_install() {
    getent group lightsd >/dev/null || groupadd -r lightsd
    getent passwd lightsd >/dev/null || useradd -r -d / -g lightsd lightsd

    cat << 'EOF'

lightsd runs under the `lightsd' user and group by default; add yourself to
this group to be able to open lightsd's socket and pipe under /run/lightsd:

  gpasswd -a $USER lightsd

Re-open your current desktop or ssh session for the change to take effect.
Then use systemctl to start lightsd; you can start playing with lightsd with:

  $(lightsd --prefix)/share/lightsd/examples/lightsc.py

EOF
}

post_remove() {
    getent passwd lightsd >/dev/null && userdel lightsd
}