From d182a363b6a353a79686d88cd802ef4d16bdb33b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 28 Mar 2018 15:22:30 +0100 Subject: [PATCH] Check that file exists --- src/freedombone-upgrade | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/freedombone-upgrade b/src/freedombone-upgrade index 0f84be56..1abb20ca 100755 --- a/src/freedombone-upgrade +++ b/src/freedombone-upgrade @@ -63,9 +63,11 @@ if [ $DEVELOPMENT_BRANCH ]; then fi fi -if grep -q "cat /root/dbpass" /usr/bin/backupdatabases; then - # update to using the password manager - sed -i "s|cat /root/dbpass|freedombone-pass -u root -a mariadb|g" /usr/bin/backupdatabases +if [ -f /usr/bin/backupdatabases ]; then + if grep -q "cat /root/dbpass" /usr/bin/backupdatabases; then + # update to using the password manager + sed -i "s|cat /root/dbpass|freedombone-pass -u root -a mariadb|g" /usr/bin/backupdatabases + fi fi #update-ca-certificates