mirror of
https://github.com/ben-grande/qusal.git
synced 2025-01-02 11:26:11 -05:00
011a71a36d
Editorconfig can only act based on file extension and path, not attributes, it remains a mean only for multiple collaborators to use the same configuration on their editor. When it is too restrictive, such as not considering the file syntax, use a lint tool for the specific file type instead of trusting editorconfig. Changes were made to increase readability.
19 lines
502 B
Bash
Executable File
19 lines
502 B
Bash
Executable File
#!/bin/sh
|
|
## SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
|
##
|
|
## SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
set -eu
|
|
|
|
conf="${HOME}/.bitcoin/conf.d/cookie.conf"
|
|
|
|
if ! systemctl is-active bitcoind >/dev/null 2>&1; then
|
|
echo "systemd service 'bitcoind' is inactive" >&2
|
|
echo "remote RPC can't add crendetials" >&2
|
|
exit 1
|
|
fi
|
|
|
|
rpc_list="$(bitcoin-cli help | awk '/^[a-z]/{print $1}' | tr "\n" ",")"
|
|
|
|
echo "rpcwhitelist=__cookie__:${rpc_list}" | tee "${conf}" >/dev/null
|