summaryrefslogtreecommitdiffstats
path: root/core/modules/hardware-stats/data/opt/openslx/pam/hooks
diff options
context:
space:
mode:
authorSimon Rettberg2019-06-28 16:56:22 +0200
committerroot2019-06-28 17:12:49 +0200
commitf8abc5d351b6fa2293593d394a80c83665d5729d (patch)
treee24a9ee760e50f66cf6698eaf0a73ee104b2b93b /core/modules/hardware-stats/data/opt/openslx/pam/hooks
parent[pam-slx-plug] Move slx-plug specific hook directory (diff)
downloadmltk-f8abc5d351b6fa2293593d394a80c83665d5729d.tar.gz
mltk-f8abc5d351b6fa2293593d394a80c83665d5729d.tar.xz
mltk-f8abc5d351b6fa2293593d394a80c83665d5729d.zip
[pam-slx-plug] Move old pam_script_* hook dirs to pam dir
They're all now in subdirectories of /opt/openslx/pam/hooks. Symlinks have been put in place where they used to reside.
Diffstat (limited to 'core/modules/hardware-stats/data/opt/openslx/pam/hooks')
l---------core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-close.d/usage_stats1
-rw-r--r--core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-open.d/usage_stats9
2 files changed, 10 insertions, 0 deletions
diff --git a/core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-close.d/usage_stats b/core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-close.d/usage_stats
new file mode 120000
index 00000000..129ca2f8
--- /dev/null
+++ b/core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-close.d/usage_stats
@@ -0,0 +1 @@
+../pam_script_ses_open.d/usage_stats \ No newline at end of file
diff --git a/core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-open.d/usage_stats b/core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-open.d/usage_stats
new file mode 100644
index 00000000..e2154aa7
--- /dev/null
+++ b/core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-open.d/usage_stats
@@ -0,0 +1,9 @@
+#!/bin/ash - sourced
+
+if [ "x$PAM_SERVICE" != "xsu" -a "x$PAM_SERVICE" != "xsudo" ]; then
+ sleep 3
+ /opt/openslx/scripts/cron-system_usage_update
+fi &
+
+true
+