File: postinst

package info (click to toggle)
input-remapper 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,876 kB
  • sloc: python: 27,262; sh: 191; xml: 33; makefile: 3
file content (17 lines) | stat: -rwxr-xr-x 782 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
if [ -d "/run/systemd/system/" ]; then
  # old name, those lines should at some point be removed from postinst
  pkill -f key-mapper-service
  systemctl disable key-mapper 2> /dev/null || true
  systemctl stop key-mapper 2> /dev/null || true

  # The ubuntu package creates those two symlinks that break when installing the .deb
  # built from source. Either ubuntus packages need to be uninstalled with --purge first,
  # or those files need to be unlinked manually.
  unlink /etc/systemd/system/input-remapper.service || true
  unlink /etc/systemd/system/default.target.wants/input-remapper-daemon.service || true

  pkill -f input-remapper-service  # might have been started by the gui previously
  systemctl enable input-remapper
  systemctl start input-remapper
fi