1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/restic_ynh.git synced 2024-09-03 20:16:22 +02:00

Kill restic process when updating

Otherwise it blocks the update
This commit is contained in:
Lionel Coupouchetty-Ramouchetty 2020-03-04 07:46:32 +01:00
parent 20cc68ea81
commit 43892e8c1f

View file

@ -33,6 +33,7 @@ install_restic () {
expected_sum=$(grep restic_${RESTIC_VERSION}_linux_${arch}.bz2 /tmp/restic-sha256sums | awk '{print $1}')
sum=$(sha256sum /tmp/restic.bz2 | awk '{print $1}')
if [ "$sum" == "$expected_sum" ];then
pkill restic || true
bunzip2 /tmp/restic.bz2 -f -c > /usr/local/bin/restic
chmod +x /usr/local/bin/restic
else