saving uncommitted changes in /etc prior to dnf run
This commit is contained in:
@@ -4872,6 +4872,7 @@ maybe chmod 0644 'ssh/ssh_host_rsa_key.pub'
|
|||||||
maybe chmod 0600 'ssh/sshd_config'
|
maybe chmod 0600 'ssh/sshd_config'
|
||||||
maybe chmod 0600 'ssh/sshd_config.orig'
|
maybe chmod 0600 'ssh/sshd_config.orig'
|
||||||
maybe chmod 0600 'ssh/sshd_config.rpmnew'
|
maybe chmod 0600 'ssh/sshd_config.rpmnew'
|
||||||
|
maybe chmod 0755 'ssh/sshrc'
|
||||||
maybe chmod 0755 'ssl'
|
maybe chmod 0755 'ssl'
|
||||||
maybe chmod 0644 'sslh.cfg'
|
maybe chmod 0644 'sslh.cfg'
|
||||||
maybe chown 'sssd' 'sssd'
|
maybe chown 'sssd' 'sssd'
|
||||||
|
|||||||
12
ssh/sshrc
Executable file
12
ssh/sshrc
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export PATH="/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:$PATH"
|
||||||
|
|
||||||
|
HOSTNAME="$(hostname)"
|
||||||
|
|
||||||
|
if [[ "$USER" == "laser" ]]
|
||||||
|
then
|
||||||
|
curl -s -X POST -H "content-type: application/json" -d '{"routing_key":"1969ec3d30b74608d0135d6321275bb7","event_action":"trigger","payload":{"summary":"User '"$USER"' has logged in via SSH!!","source":"/etc/ssh/sshrc","severity":"critical","component":"exploratory-stats","group":"prod-d atapipe","class":"deploy"}}' https://events.pagerduty.com/v2/enqueue
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user