Skip to content

Commit

Permalink
fix install script
Browse files Browse the repository at this point in the history
  • Loading branch information
volllly committed Feb 12, 2024
1 parent a4755eb commit e76f146
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions scripts/linux/install.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/bin/bash
cd "$(dirname "$0")"

if type jq > /dev/null && [ -f launcher.configuration.json ]; then
servicefolder=$(jq -r '.serviceFolder' launcher.configuration.json) || {
echo "Failed to parse launcher.configuration.json"
exit 1
}
servicefolder="/var/lib/fiskaltrust"
if type jq > /dev/null; then
if [ -f launcher.configuration.json ]; then
servicefolder=$(jq -r '.serviceFolder // "/var/lib/fiskaltrust"' launcher.configuration.json) || {
echo "Failed to parse launcher.configuration.json"
exit 1
}
else
echo "launcher.configuration.json does not exist, using default service folder"
fi
else
echo "jq not found or launcher.configuration.json does not exist, using default service folder"
servicefolder="/var/lib/fiskaltrust"
echo "jq not found, using default service folder"
fi

# if default servicefolder does not exist, create it
Expand Down

0 comments on commit e76f146

Please sign in to comment.