diff --git a/lib/core/toolrepos/autoupdate/com.includedhealth.auto-update-repositories.plist b/lib/core/toolrepos/autoupdate/com.includedhealth.auto-update-repositories.plist
index 2186480..06ef725 100644
--- a/lib/core/toolrepos/autoupdate/com.includedhealth.auto-update-repositories.plist
+++ b/lib/core/toolrepos/autoupdate/com.includedhealth.auto-update-repositories.plist
@@ -6,7 +6,7 @@
Label
com.includedhealth.auto-update-repositories
Program
- $IH_HOME/homebrew-ih-public/lib/core/toolrepos/autoupdate/ih_auto_update_repositories.sh
+ $IH_CORE_LIB_DIR/core/toolrepos/autoupdate/ih_auto_update_repositories.sh
EnvironmentVariables
IH_HOME
diff --git a/lib/core/toolrepos/step.sh b/lib/core/toolrepos/step.sh
index b34306c..8daa8c2 100644
--- a/lib/core/toolrepos/step.sh
+++ b/lib/core/toolrepos/step.sh
@@ -109,10 +109,12 @@ function ih::setup::core.toolrepos::set-auto-update-repositories-job() {
# shellcheck disable=SC2001
GR_HOME_ESC=$(echo "$GR_HOME" | sed 's_/_\\/_g')
+ # shellcheck disable=SC2001
+ IH_CORE_LIB_DIR_ESC=$(echo "$IH_CORE_LIB_DIR" | sed 's_/_\\/_g')
- sed "s/\$IH_HOME/${GR_HOME_ESC}/g" "${THIS_DIR}/${PLIST_FILE}.plist" >"${LAUNCH_AGENTS_PATH}"
+ sed "s/\$IH_HOME/${GR_HOME_ESC}/g; s/\$IH_CORE_LIB_DIR/${IH_CORE_LIB_DIR_ESC}/g" "${THIS_DIR}/${PLIST_FILE}.plist" >"${LAUNCH_AGENTS_PATH}"
- if launchctl list | grep -q ${PLIST_FILE}; then
+ if launchctl list | grep -e ${PLIST_FILE}; then
launchctl unload "${LAUNCH_AGENTS_PATH}"
fi