From 5723bf46ad88dc8a691f6c3fa40be512aa7f8574 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 21 Dec 2016 20:07:42 +0000 Subject: [PATCH] Simplify --- src/freedombone-utils-upgrade | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/freedombone-utils-upgrade b/src/freedombone-utils-upgrade index 09426f37..e3aebd5c 100755 --- a/src/freedombone-utils-upgrade +++ b/src/freedombone-utils-upgrade @@ -32,11 +32,7 @@ UPGRADE_SCRIPT_NAME="${PROJECT_NAME}-upgrade" function create_upgrade_script { - if [ -f /usr/local/bin/${PROJECT_NAME}-upgrade ]; then - cp /usr/local/bin/${PROJECT_NAME}-upgrade /etc/cron.weekly/$UPGRADE_SCRIPT_NAME - else - cp /usr/bin/${PROJECT_NAME}-upgrade /etc/cron.weekly/$UPGRADE_SCRIPT_NAME - fi + cp $(which ${PROJECT_NAME}-upgrade) /etc/cron.weekly/$UPGRADE_SCRIPT_NAME if [[ $(is_completed $FUNCNAME) == "1" ]]; then return