mirror of
				https://github.com/jtesta/ssh-audit.git
				synced 2025-10-31 05:25:28 +01:00 
			
		
		
		
	Added timeout of 0 to container stop command.
This commit is contained in:
		| @@ -423,18 +423,18 @@ function run_test { | |||||||
|     ./ssh-audit.py localhost:2222 > $test_result_stdout |     ./ssh-audit.py localhost:2222 > $test_result_stdout | ||||||
|     if [[ $? != 0 ]]; then |     if [[ $? != 0 ]]; then | ||||||
| 	echo -e "${REDB}Failed to run ssh-audit.py! (exit code: $?)${CLR}" | 	echo -e "${REDB}Failed to run ssh-audit.py! (exit code: $?)${CLR}" | ||||||
| 	docker container stop $cid > /dev/null | 	docker container stop -t 0 $cid > /dev/null | ||||||
| 	exit 1 | 	exit 1 | ||||||
|     fi |     fi | ||||||
|  |  | ||||||
|     ./ssh-audit.py -j localhost:2222 > $test_result_json |     ./ssh-audit.py -j localhost:2222 > $test_result_json | ||||||
|     if [[ $? != 0 ]]; then |     if [[ $? != 0 ]]; then | ||||||
| 	echo -e "${REDB}Failed to run ssh-audit.py! (exit code: $?)${CLR}" | 	echo -e "${REDB}Failed to run ssh-audit.py! (exit code: $?)${CLR}" | ||||||
| 	docker container stop $cid > /dev/null | 	docker container stop -t 0 $cid > /dev/null | ||||||
| 	exit 1 | 	exit 1 | ||||||
|     fi |     fi | ||||||
|  |  | ||||||
|     docker container stop $cid > /dev/null |     docker container stop -t 0 $cid > /dev/null | ||||||
|     if [[ $? != 0 ]]; then |     if [[ $? != 0 ]]; then | ||||||
|        echo -e "${REDB}Failed to stop docker container ${cid}! (exit code: $?)${CLR}" |        echo -e "${REDB}Failed to stop docker container ${cid}! (exit code: $?)${CLR}" | ||||||
|        exit 1 |        exit 1 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Joe Testa
					Joe Testa