This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Script Location | |
| # /usr/local/bin/sshd-login-notification.sh | |
| # Make root owner, 700, +x | |
| # Add the following line to: /etc/pam.d/sshd | |
| # session optional pam_exec.so /usr/local/bin/sshd-login-notification.sh | |
| # Your Email Information: Recipient (To:), Subject and Body |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Script generado por santiagosony | |
| filename=/tmp/backup-$(date '+%Y-%m-%d').7z | |
| 7z a $filename /etc/ /home/ /root/ /var/lib/homebridge/backups/instance-backups/ | |
| rclone -v --gcs-bucket-policy-only copy $filename gcs:<BUCKET_PATH>/$(date '+%Y')/ | |
| rm -v $filename |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### OS ### | |
| # Get hostname | |
| hostnamectl | |
| hostname | |
| # Get OS release | |
| cat /etc/os-release | |
| uname -a | |
| lsb_release -a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmd | |
| ------------------------ | |
| netstat -a | |
| Atajos | |
| ------------------------ | |
| Win logo + X | |
| PowerShell | |
| ------------------------- |