Merge pull request 'Update README.md' (#19) from v1 into master
Reviewed-on: https://www.cainet.info/git/cai/CAI-Watchdog/pulls/19
This commit is contained in:
commit
dbb860a00b
@ -147,7 +147,7 @@ Watchdog can send notifications on user login. Just add to ```/etc/profile.d/ssh
|
||||
IP=$(echo $SSH_CONNECTION | awk '{ print $1 == "" ? "127.0.0.1" : $1 }')
|
||||
CAI_WATCHDOG_PATH=/etc/cai-watchdog
|
||||
source ${CAI_WATCHDOG_PATH}/inc-icons
|
||||
${CAI_WATCHDOG_PATH}//send-mail your@mail.addr '${ICON_INFO} SSH: User ${User} is logged in' '${ICON_INFO} SSH: User ${User} is logged in from ${IP}'
|
||||
${CAI_WATCHDOG_PATH}/send-mail your@mail.addr '${ICON_INFO} SSH: User ${User} is logged in' '${ICON_INFO} SSH: User ${User} is logged in from ${IP}'
|
||||
```
|
||||
|
||||
## User logouts monitoring (*nix)
|
||||
@ -158,8 +158,9 @@ Watchdog can send notifications on user login. Just add to ```/etc/profile.d/ssh
|
||||
|
||||
```
|
||||
#!/bin/sh
|
||||
CAI_WATCHDOG_PATH=/etc/cai-watchdog
|
||||
if [ "$PAM_TYPE" = "close_session" ]; then
|
||||
send-telegram "SSH: User is logged out"
|
||||
${CAI_WATCHDOG_PATH}/send-telegram "SSH: User ${PAM_USER} is logged out"
|
||||
fi
|
||||
```
|
||||
|
||||
@ -167,8 +168,9 @@ Watchdog can send notifications on user login. Just add to ```/etc/profile.d/ssh
|
||||
|
||||
```
|
||||
#!/bin/sh
|
||||
CAI_WATCHDOG_PATH=/etc/cai-watchdog
|
||||
if [ "$PAM_TYPE" = "close_session" ]; then
|
||||
send-mail your@mail.addr 'SSH: User is logged out' 'SSH: User is logged out'
|
||||
${CAI_WATCHDOG_PATH}/send-mail your@mail.addr 'SSH: User ${PAM_USER} is logged out' 'SSH: User is logged out'
|
||||
fi
|
||||
```
|
||||
and set executable flag on it
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user