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