Questions tagged [hook]
The hook tag has no summary.
47 questions
0 votes
1 answer
116 views
Why does no packet traverse the nat chain in the output or postrouting hook with this ruleset?
I have a machine with the network interface enp0s3 which is assigned the IPv4 address 192.168.20.254. Furthermore, on another machine there is a DNS server listening on the IPv4 address 192.168.20.10. ...
0 votes
1 answer
81 views
Is there a way to disallow a certain combination of commands and options?
Say, I create a new repo, and try to commit. Git shows me *** Please tell me who you are. Run git config --global user.email "[email protected]" git config --global user.name "Your ...
0 votes
0 answers
37 views
Using a script output as a file (not to a file)
I have two programs using the same configuration (chatty + pidgin) in ~/.purple but I wish to separate them into different configuration folders. My goal is to have chatty use only chatty's ...
0 votes
1 answer
525 views
Execute function in bash on every keystroke in interactive shell
I would like to run a function every time a user presses a key in an interactive bash shell. I am wondering if bash has anything built in like the self-insert function in zsh? Alternatively, I am ...
0 votes
2 answers
351 views
rclone mount webdav whenever a certain application is started
I'd like to automatically mount a nextcloud directory (webdav) with my keepass-database in it using rclone whenever I start KeepassXC and unmount it after closing Keepass. Is there any way to do this (...
0 votes
1 answer
392 views
Zsh Hook Function Definitions as arguments
I would like to know if it's possible to define hook functions as arguments or env var when launching zsh instead of defining it in .zshrc or prompt. For example ; zsh -F preexec() { date } -F chpwd() ...
0 votes
0 answers
1k views
How to add crontab task by reboot / poweroff / poweron pc?
I have next record in crontab -e, running with user root. @reboot /usr/bin/curl --silent --insecure -v -X GET https://<myserver_with_hook>?key=9d722304320de0b074d8da74bf680874&mes='nik-pc ...
-1 votes
1 answer
3k views
Capture output of a command, process it and ONLY then output to terminal
I would like to capture the stdout (as sent to a terminal), and perform some processing after it is output on the terminal (for the user). I want to know how to grab the output, process and make ...