]> git.stg.codes - stg.git/blobdiff - projects/stargazer/inst/linux/etc/stargazer/OnDisconnect
Move projects back into subfolder.
[stg.git] / projects / stargazer / inst / linux / etc / stargazer / OnDisconnect
diff --git a/projects/stargazer/inst/linux/etc/stargazer/OnDisconnect b/projects/stargazer/inst/linux/etc/stargazer/OnDisconnect
new file mode 100755 (executable)
index 0000000..64a6c51
--- /dev/null
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+# About: This script is called when the user wants to disconnect or authorization timeout has passed.
+# Common task: Rebuild firewall to disallow user to access the Internet.
+# Priority: required
+
+# User login
+LOGIN=$1
+
+# User IP
+IP=$2
+
+# User cash
+CASH=$3
+
+# User ID
+ID=$4
+
+# Selected DIRs (from rules file) to disconnect
+DIRS=$5
+
+# Usage examples:
+#echo "Disconnected `date +%Y.%m.%d-%H.%M.%S` $IP $CASH" >> /var/stargazer/users/$LOGIN/connect.log