Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Commit

Permalink
Merge pull request #235 from ludeeus/remove-controlfile
Browse files Browse the repository at this point in the history
Remove controlfile when removing suite
  • Loading branch information
Landrash committed Feb 2, 2019
2 parents a479772 + ff303ac commit 2318b32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion package/usr/local/bin/hassbian-config
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ function run-suite { #This is the function the actually run install/upgrade.
RETURN=("$?") # Return value after script execution.
if [ "$DEBUG" == "true" ]; then set +x; fi #Deactivating debug if --debug is used.
if [ "$RETURN" == "0" ]; then STATE="installed"; else printf "\\e[0mIf you have issues with this script, please say something in the #devs_hassbian channel on Discord.\\n" && STATE="failed"; fi #Set suite state to installed if 0 is returned, failed otherwise.
echo "SCRIPTSTATE=$STATE" > "$SUITE_CONTROL_DIR/$2" #Setting status in control file.
if [ "$1" == "remove" ]; then
rm "$SUITE_CONTROL_DIR/$2"
else
echo "SCRIPTSTATE=$STATE" > "$SUITE_CONTROL_DIR/$2" #Setting status in control file.
fi
return 0
}

Expand Down

0 comments on commit 2318b32

Please sign in to comment.