add stop&remove stopped container before start

This commit is contained in:
ksemele 2022-07-10 20:43:42 +03:00
parent 4c334e0e32
commit c7f201486f
1 changed files with 5 additions and 0 deletions

5
run.sh
View File

@ -1 +1,6 @@
#!/bin/bash
container=$(podman ps --noheading | grep expense-bot | awk '{print$1}')
sudo podman stop $container
sudo podman rm $container
sudo podman run -d --name expense-bot --restart always quay.io/ksemele/expense-bot:0.1.0 sudo podman run -d --name expense-bot --restart always quay.io/ksemele/expense-bot:0.1.0