Skip to content

Commit f9feff1

Browse files
Merge pull request andrewjfreyer#333 from hackacad/master
check if service_path exists
2 parents d043451 + a7e8b9c commit f9feff1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

support/init

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ FILTERED_ARGS=$(printf '%s\n' "$(IFS=' '; echo "${RUNTIME_ARGS[*]}")" | sed 's/
212212
#CHECK FOR CORRECT SERVICE;
213213
if [ "$should_install" == "y" ] || [ "$PREF_UPDATE_SERVICE" == true ] ; then
214214
#REMOVE ALL INSTANCES
215-
rm "$service_path" 2>&1 >/dev/null
215+
if [ -f "$service_path" ]; then
216+
rm "$service_path" 2>&1 >/dev/null
217+
fi
216218

217219
#CHECK FOR SYSTEMCTL FILE
218220
base_directory=$(dirname "$(readlink -f "$0")")

0 commit comments

Comments
 (0)