Improve some scripts

This commit is contained in:
Tobias Reisinger 2023-12-12 18:55:32 +01:00
parent 41935c352c
commit 8d6ab690c4
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 11 additions and 1 deletions

View file

@ -30,7 +30,7 @@ pass_path=$project_dir/$(echo "$pass_content" | grep "path:" | cut -d' ' -f2-)
case "$1" in
edit)
pass edit "ansible/$project"
ansible-vault edit "$pass_path"
exit 0
;;
deploy)
@ -41,6 +41,10 @@ case "$1" in
pass insert -m "ansible/$project.file" < "$pass_path"
exit 0
;;
pass-edit)
pass edit "ansible/$project"
exit 0
;;
esac
echo "$pass_content" | head -n 1

6
.bin/user-cleaner Executable file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env sh
# clean old logs
log_dir="$HOME/.cache/logs"
[ -d "$log_dir" ] \
&& find "$log_dir" -type f -mtime +7 -delete