treewide: use consistent bash script indentation
Always use two spaces.
This commit is contained in:
parent
c758d68ea4
commit
b8043d3db5
|
@ -374,11 +374,11 @@ in {
|
|||
cd ${cfg.cli}/bin
|
||||
echo "Importing node banlist..."
|
||||
cat ${./banlist.cli.txt} | while read line; do
|
||||
if ! err=$(eval "$line" 2>&1) && [[ $err != *already\ banned* ]]; then
|
||||
# unexpected error
|
||||
echo "$err"
|
||||
exit 1
|
||||
fi
|
||||
if ! err=$(eval "$line" 2>&1) && [[ $err != *already\ banned* ]]; then
|
||||
# unexpected error
|
||||
echo "$err"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
'';
|
||||
serviceConfig = nbLib.defaultHardening // {
|
||||
|
|
|
@ -207,8 +207,8 @@ in {
|
|||
(nbLib.script "lnd-create-wallet" ''
|
||||
attempts=250
|
||||
while ! { exec 3>/dev/tcp/${cfg.restAddress}/${toString cfg.restPort} && exec 3>&-; } &>/dev/null; do
|
||||
((attempts-- == 0)) && { echo "lnd REST service unreachable"; exit 1; }
|
||||
sleep 0.1
|
||||
((attempts-- == 0)) && { echo "lnd REST service unreachable"; exit 1; }
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
if [[ ! -f ${networkDir}/wallet.db ]]; then
|
||||
|
|
|
@ -110,17 +110,17 @@ in
|
|||
''}
|
||||
|
||||
setupSecret() {
|
||||
file="$1"
|
||||
user="$2"
|
||||
group="$3"
|
||||
permissions="$4"
|
||||
if [[ ! -e $file ]]; then
|
||||
echo "Error: Secret file '$file' is missing"
|
||||
exit 1
|
||||
fi
|
||||
chown "$user:$group" "$file"
|
||||
chmod "$permissions" "$file"
|
||||
processedFiles+=("$file")
|
||||
file="$1"
|
||||
user="$2"
|
||||
group="$3"
|
||||
permissions="$4"
|
||||
if [[ ! -e $file ]]; then
|
||||
echo "Error: Secret file '$file' is missing"
|
||||
exit 1
|
||||
fi
|
||||
chown "$user:$group" "$file"
|
||||
chmod "$permissions" "$file"
|
||||
processedFiles+=("$file")
|
||||
}
|
||||
|
||||
dir="${cfg.secretsDir}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user