Possible to run command/script on login?

Is there a way to run a command (fail2ban-client status vaultwarden) each time I login? Similar to what is shown in dietpi-banner?

theoretically you could place an own script inside /etc/profile.d

2 Likes

Tried putting “fail2ban-client status vaultwarden” inside a script.sh and chmod +x on that. Running it I get “fail2ban-client: command not found”

(you can see I’m not into scripts and such :wink: )

EDIT: forget it, put it into the wrong VM :man_facepalming:

Works! Thank You.

Try using the full path inside a script. Just to avoid issues :smiley:

1 Like

Full path can be found with

which fail2ban-client

Changed in script to use full path! Thank You.