Correction mineur de mise en page du code
This commit is contained in:
		
							parent
							
								
									88db5017fb
								
							
						
					
					
						commit
						f5bd189f83
					
				|  | @ -40,6 +40,7 @@ function die () { | |||
| # Fonction de verification si keepass tourne. | ||||
| # | ||||
| function check_keepassxc () { | ||||
| 
 | ||||
|     for process in $(ls -dv /proc/[0-9]* 2> $NULL); do  | ||||
|         if grep -qiE "keepassxc$" $process/status 2> $NULL; then  | ||||
|             K_PID=$(echo $process | cut -d "/" -f3) | ||||
|  | @ -49,7 +50,6 @@ function check_keepassxc () { | |||
|     done | ||||
|     echo "Aucun process Keepass en cours d'execution." | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| # Fonction de verification du repertoire $HOME_DIR/tmp | ||||
|  | @ -65,9 +65,10 @@ function check_tmp () { | |||
|     fi | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| # Fonction de rotation des bases a sauvegarder dans le git. | ||||
| # Gestion du git add/remove dans un deuxieme temps. | ||||
| 
 | ||||
| # | ||||
| function base_rotation () { | ||||
| 
 | ||||
|     cd $HOME_DIR/$TMP_DIR | ||||
|  | @ -85,17 +86,15 @@ function base_rotation () { | |||
|             git commit -m "Remove de $NOM_TMP" | ||||
|             git push | ||||
|         fi | ||||
| 
 | ||||
|     done | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| # Fonction de copie de la base avant de push sur le git | ||||
| # | ||||
| function copie_base () { | ||||
| 
 | ||||
| 
 | ||||
|     cd $HOME_DIR | ||||
| 
 | ||||
|     cp $NOM_BASE$EXT_BASE $TMP_DIR/"1_$NOM_BASE-$DATE$EXT_BASE"  | ||||
|     git add tmp/1_* | ||||
|     echo "Verification des HASH." | ||||
|  | @ -111,11 +110,13 @@ function copie_base () { | |||
|     else | ||||
|         die 3 | ||||
|     fi | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| # Fonction de generation du fichier des checksums et de l'upload  | ||||
| # sur gitea | ||||
| function git_upload () { | ||||
|      | ||||
|     cd $TMP_DIR | ||||
|     echo > $CHECKSUM_FICHIER | ||||
|     for nb in $(seq 1 $ROTATE); do | ||||
|  | @ -128,6 +129,8 @@ function git_upload () { | |||
| 
 | ||||
| } | ||||
| 
 | ||||
| # Fonction principale | ||||
| # | ||||
| function main () { | ||||
| 
 | ||||
|     # Deplacement dans le home | ||||
|  | @ -149,9 +152,9 @@ function main () { | |||
| 
 | ||||
|     # upload de la base sur gitea | ||||
|     git_upload | ||||
| 
 | ||||
|     echo | ||||
|     exit 0 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| main | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Snorky
						Snorky