Skip to content

Commit

Permalink
Fix disconnect log
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Feb 7, 2017
1 parent ab7f85b commit 9891cda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion installation/scripts/disconnect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ trusted_port=$(echap "$trusted_port")
mysql -h$HOST -P$PORT -u$USER -p$PASS $DB -e "UPDATE user SET user_online=0 WHERE user_id='$common_name'"

# We insert the deconnection datetime
mysql -h$HOST -P$PORT -u$USER -p$PASS $DB -e "UPDATE log SET log_end_time=now(), log_received='$bytes_received', log_send='$bytes_sent' WHERE log_trusted_ip='$trusted_ip' AND log_trusted_port='$trusted_port' AND user_id='$common_name' AND log_end_time=NULL"
mysql -h$HOST -P$PORT -u$USER -p$PASS $DB -e "UPDATE log SET log_end_time=now(), log_received='$bytes_received', log_send='$bytes_sent' WHERE log_trusted_ip='$trusted_ip' AND log_trusted_port='$trusted_port' AND user_id='$common_name' AND log_end_time IS NULL"

0 comments on commit 9891cda

Please sign in to comment.