add some ideas for improvements
This commit is contained in:
32
TODO.md
Normal file
32
TODO.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# TODO
|
||||
|
||||
## easy cert revocation
|
||||
|
||||
here comes an example for watching file changes
|
||||
the idea is to extend the step-ca container to be able to revoke certificates easily.
|
||||
not that i think this is needed 0:-)
|
||||
|
||||
source: https://stackoverflow.com/questions/22884580/bash-a-way-to-watch-files-for-changes#22885210
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
watched_files=$@ # pass watched files as cmd line arguments
|
||||
|
||||
if [ -z "$watched_files" ]; then
|
||||
echo "Nothing to watch, abort"
|
||||
exit
|
||||
else
|
||||
echo "watching: $watched_files"
|
||||
fi
|
||||
|
||||
previous_checksum="dummy"
|
||||
while [ 1 ]; do
|
||||
checksum=$(md5sum $watched_files | md5sum)
|
||||
if [ "$checksum" != "$previous_checksum" ]; then
|
||||
echo "None shall pass!" # do your stuff here
|
||||
fi
|
||||
previous_checksum="$checksum"
|
||||
sleep 1
|
||||
done
|
||||
```
|
||||
Reference in New Issue
Block a user