【问题标题】:How to add the function 'log out on other computers'?如何添加“在其他计算机上注销”功能?
【发布时间】:2017-05-13 17:19:27
【问题描述】:

例如,我经常忘记在其他人的计算机上注销您的网站,但并不总是有机会返回并注销。如何在我的计算机上创建一个自动关闭除我当前会话之外的所有会话的功能?

【问题讨论】:

  • “我经常忘记登出您的网站”。所以这取决于mysite。如果我为此提供API,那么只有你可以使用它。

标签: python django django-admin


【解决方案1】:

我认为有多种方式来看待这个问题。下面是我用的那个

使用 TMOUT

将以下行添加到您的 bash 启动文件,例如 $HOME/.bash_profile 或在 /etc/profile.d 目录中创建一个名为 timout-settings.sh 的新 bash shell 脚本:

## append in $HOME/.bash_profile
## 300 seconds == 5 minutes ##
TMOUT=300
readonly TMOUT
export TMOUT

或 /etc/profile.d/timout-settings.sh

#!/bin/bash
## 300 seconds == 5 minutes ##
TMOUT=300
readonly TMOUT
export TMOUT

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-06-29
    • 2012-03-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-18
    • 2021-11-21
    相关资源
    最近更新 更多