Browse Source

Source install script in hooks if ran before install-hook

Joachim M. Giæver 3 years ago
parent
commit
2a315868de
2 changed files with 2 additions and 2 deletions
  1. 1 1
      scripts/hooks/configure
  2. 1 1
      scripts/hooks/connect-plug-configurations

+ 1 - 1
scripts/hooks/configure

@@ -6,7 +6,7 @@ logger "Configure snap!"
 
 if [ ! -f "${SNAP_DATA}/settings.conf" ]; then
     logger "Settings-file is missing"
-    exit 1
+    source "$SNAP/snap/hooks/install"
 else
     logger "Settings.conf exists, continue configure"
 fi

+ 1 - 1
scripts/hooks/connect-plug-configurations

@@ -4,7 +4,7 @@ logger "Connect plug!"
 
 if [ ! -f "${SNAP_DATA}/settings.conf" ]; then
     logger "Settings-file is missing"
-    exit 1
+    source "$SNAP/snap/hooks/install"
 else
     logger "Settings.conf exists, continue plug:configurations"
 fi