I made the icy-nord and icy-nord-darker themes.
@promitheas:matrix.org
- 2 Posts
- 5 Comments
- promitheas@programming.devOPtoLinux Questions@lemmy.zip•Trying to set up email alerts for ssh logins on my server with PAM. Getting error code 2English1·9 months ago
$ cat /usr/local/bin/login-alert.sh #!/bin/bash # Sends alerts only for real terminals not cron jobs if [[ -n "$SSH_CONNECTION" ]]; then USERNAME=$(whoami) IP=$(echo $SSH_CONNECTION | awk '{print $1}') HOST=$(hostname) DATETIME=$(date) /usr/local/bin/semail \ -s "[CRITICAL] SSH Login to $HOST" \ -b "Login detected:\n\nUser: $USERNAME\nIP: $IP\nTime: $DATETIME\nTTY: $SSH_TTY" fiI feel like since Im already using systemd to monitor the directories it would be best to have everything working with systemd, also because I will be adding several other such functionalities to monitor various things. For example something I already implemented is a systemd service + timer combination to periodically check the main branch of the git repo for changes to the servers local repo, and if there are any to pull them and restart any services necessary to reflect these changes on the web app, then once again email me that that happened. This way i dont need to actually connect to the server to update any changes, just push code to github.
This is my first time doing a project like this, so this might make you seasoned sysadmins yell out in horror, idk, but since Im the only one who can push code to the repo I feel its quite safe, and makes life a lot easier for me xD
- promitheas@programming.devOPtoLinux Questions@lemmy.zip•Trying to set up email alerts for ssh logins on my server with PAM. Getting error code 2English1·9 months ago
Ill try adding the log options, and come back with results.
As for the sshd config, UsePAM is set to yes.
- promitheas@programming.devOPtoLinux Questions@lemmy.zip•Trying to set up email alerts for ssh logins on my server with PAM. Getting error code 2English1·9 months ago
Yep, its executable.
- promitheas@programming.devtoLinux@lemmy.ml•How do I map "caplock to escape but shift+caplock = normal caplock", like Gnome has?0·1 year ago
Commenting because fellow caps-esc swap enthusiast, and I would like to know the answer as well
Heres my ~/.bin directory:
https://github.com/promitheas17j/dotfiles/tree/main/dot_bin
Hopefully thats what youre asking for.
My favourite ones are:
One that Im still working on but will for sure be my favourite once its done is parse_keybinds.sh and keybind_cheatsheet.sh, which go through some of the software I have and parse their config files to extract all the keybinds into a file with a specific format. The latter script then launches a rofi menu where I can fuzzy search keybinds based on software name and what I want to do but cant remember the binding for. So far Ive got sxhkd and lf, but I consider it a work in progress because I want to also parse neovim bindings, but sxhkd and lf are single file configs while neovim has bindings in multiple files spread across multiple subdirectories in its config directory.