summaryrefslogtreecommitdiff
path: root/community/neatx/neatx.install
blob: 89356878c33e558d9a41aa61e8ba74c4d9a135e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
post_install() {
  useradd -d /opt/NX/home/nx -s /usr/lib/neatx/nxserver-login-wrapper nx &> /dev/null
  mkdir -p ~nx/.ssh
  cp /usr/share/neatx/authorized_keys.nomachine ~nx/.ssh/authorized_keys
  chmod 600 ~nx/.ssh/authorized_keys
  chown -R nx ~nx
  post_remove
}

pre_remove() {
  userdel nx > /dev/null 2>&1
  rm -rf ~nx
}

post_remove() {
  sed  -e '/\/opt\/NX\/lib/d' -i etc/ld.so.conf
  ldconfig
}