]> 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
index c29a011edaffafbefd35396cb27333d55b4f1a5f..64a6c519daa79255d73e77561d19e15fa4c203dd 100755 (executable)
@@ -1,27 +1,23 @@
-# Этот скрипт вызывается в момент, когда пользователь
-# желает отключится от интернета или вышел таймаут у пользователя
-# и сервер сам отключает пользователя
-# Задача скрипта подобна задаче скрипта OnConnect - перестроить 
-# файрвол так, что бы пользователю закрыть доступ в интернет
+#! /bin/sh
 
-# Login
+# 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
+# User IP
 IP=$2
 
-#cash
+# User cash
 CASH=$3
 
-#user ID
+# User ID
 ID=$4
 
-#Selected dirs to disconnect
-DIRS=$4
-
-#echo "D `date +%Y.%m.%d-%H.%M.%S` $IP $CASH" >> /var/stargazer/users/$LOGIN/connect.log
-
-
-
-
+# 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