Improve some scripts
This commit is contained in:
		
							parent
							
								
									41935c352c
								
							
						
					
					
						commit
						8d6ab690c4
					
				
					 2 changed files with 11 additions and 1 deletions
				
			
		| 
						 | 
					@ -30,7 +30,7 @@ pass_path=$project_dir/$(echo "$pass_content" | grep "path:" | cut -d' ' -f2-)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
case "$1" in
 | 
					case "$1" in
 | 
				
			||||||
	edit)
 | 
						edit)
 | 
				
			||||||
		pass edit "ansible/$project"
 | 
							ansible-vault edit "$pass_path"
 | 
				
			||||||
		exit 0
 | 
							exit 0
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	deploy)
 | 
						deploy)
 | 
				
			||||||
| 
						 | 
					@ -41,6 +41,10 @@ case "$1" in
 | 
				
			||||||
		pass insert -m "ansible/$project.file" < "$pass_path"
 | 
							pass insert -m "ansible/$project.file" < "$pass_path"
 | 
				
			||||||
		exit 0
 | 
							exit 0
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
 | 
						pass-edit)
 | 
				
			||||||
 | 
							pass edit "ansible/$project"
 | 
				
			||||||
 | 
							exit 0
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
esac
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "$pass_content" | head -n 1
 | 
					echo "$pass_content" | head -n 1
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										6
									
								
								.bin/user-cleaner
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								.bin/user-cleaner
									
										
									
									
									
										Executable 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
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue