mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
12 lines
298 B
Bash
Executable file
12 lines
298 B
Bash
Executable file
#!/bin/bash
|
|
|
|
mydir=$(dirname "$0")
|
|
sudo "$mydir/send_login_alert.sh"
|
|
|
|
shell=$(getent passwd $LOGNAME | cut -d: -f7)
|
|
if [[ -n $SSH_ORIGINAL_COMMAND ]] # command given, so run it
|
|
then
|
|
exec "$shell" -c "$SSH_ORIGINAL_COMMAND"
|
|
else # no command, so interactive login shell
|
|
exec "$shell" -il
|
|
fi
|