blob: 652e0f2f1697b265784830f0c5786e53c9905753 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
post_install() {
echo "(Re)creating group and user ..."
getent passwd g13 > /dev/null 2>&1 || useradd -c 'Logitech G13 daemon' -G wheel -d /run/g13d -s /usr/bin/nologin -r g13
passwd -l g13 > /dev/null
echo "(Re)creating tmpfiles ..."
systemd-tmpfiles --create /usr/lib/tmpfiles.d/g13.conf
echo "NOTE: Uncomment lines in /usr/lib/udev/rules.d/91-g13.rules to start g13 systemd service when G13 is connected"
echo " and add commands to /etc/g13/default.bind for initial configuration (see /usr/share/doc/g13-git/examples)"
echo " Location of g13d input fifo has moved from /tmp/g13-0 to /run/g13d/g13-0"
}
post_upgrade() {
post_install
}
pre_remove() {
echo "Removing tmpfiles ..."
systemd-tmpfiles --remove /usr/lib/tmpfiles.d/g13.conf
}
post_remove() {
echo "Making sure the g13d service is not running ..."
systemctl stop g13
echo "Removing user and group ..."
getent passwd g13 > /dev/null 2>&1 && userdel g13
}
|