summarylogtreecommitdiffstats
path: root/nomachine-client.install
diff options
context:
space:
mode:
Diffstat (limited to 'nomachine-client.install')
-rw-r--r--nomachine-client.install40
1 files changed, 40 insertions, 0 deletions
diff --git a/nomachine-client.install b/nomachine-client.install
new file mode 100644
index 000000000000..d397d7c91c7b
--- /dev/null
+++ b/nomachine-client.install
@@ -0,0 +1,40 @@
+_invoke() {
+ # arg1: --install | --update | --uninstall
+ # NX_INSTALL_DEBUG=1
+ NX_INSTALL_PREFIX=/usr/share /usr/share/NX/scripts/setup/nxclient "$1" arch
+}
+
+
+_check_remove_old_prefix()
+{
+ if [ -d /usr/NX ]; then
+ echo "Old installation (/usr) found, removing"
+
+ if [ -x /usr/NX/scripts/setup/nxclient ]; then
+ NX_INSTALL_PREFIX=/usr /usr/NX/scripts/setup/nxclient --uninstall fedora
+ fi
+
+ rm -rf /usr/NX
+ fi
+}
+
+post_install()
+{
+ echo "Running NX post_install script ..."
+ _invoke --install
+}
+
+pre_remove()
+{
+ echo "Running NX pre_remove script ..."
+ _invoke --uninstall
+}
+
+
+post_upgrade()
+{
+ echo "Running NX post_upgrade script ..."
+ _check_remove_old_prefix
+ chmod +x /usr/share/NX/scripts/restricted/nxusb.sh || true
+ _invoke --update
+}