Always chown bitcoin/liquid data directories
This commit is contained in:
parent
0e4554feae
commit
f707d970ae
|
@ -207,15 +207,13 @@ in {
|
||||||
preStart = ''
|
preStart = ''
|
||||||
if ! test -e ${cfg.dataDir}; then
|
if ! test -e ${cfg.dataDir}; then
|
||||||
mkdir -m 0770 -p '${cfg.dataDir}'
|
mkdir -m 0770 -p '${cfg.dataDir}'
|
||||||
chown -R '${cfg.user}:${cfg.group}' '${cfg.dataDir}'
|
|
||||||
fi
|
fi
|
||||||
if ! test -e ${cfg.dataDir}/blocks; then
|
if ! test -e ${cfg.dataDir}/blocks; then
|
||||||
mkdir -m 0770 -p '${cfg.dataDir}/blocks'
|
mkdir -m 0770 -p '${cfg.dataDir}/blocks'
|
||||||
chown -R '${cfg.user}:${cfg.group}' '${cfg.dataDir}/blocks'
|
|
||||||
fi
|
fi
|
||||||
cp '${cfg.configFileOption}' '${cfg.dataDir}/bitcoin.conf'
|
cp '${cfg.configFileOption}' '${cfg.dataDir}/bitcoin.conf'
|
||||||
chmod o-rw '${cfg.dataDir}/bitcoin.conf'
|
chmod o-rw '${cfg.dataDir}/bitcoin.conf'
|
||||||
chown '${cfg.user}:${cfg.group}' '${cfg.dataDir}/bitcoin.conf'
|
chown -R '${cfg.user}:${cfg.group}' '${cfg.dataDir}'
|
||||||
echo "rpcpassword=$(cat /secrets/bitcoin-rpcpassword)" >> '${cfg.dataDir}/bitcoin.conf'
|
echo "rpcpassword=$(cat /secrets/bitcoin-rpcpassword)" >> '${cfg.dataDir}/bitcoin.conf'
|
||||||
chmod -R g+rX '${cfg.dataDir}/blocks'
|
chmod -R g+rX '${cfg.dataDir}/blocks'
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -180,11 +180,10 @@ in {
|
||||||
preStart = ''
|
preStart = ''
|
||||||
if ! test -e ${cfg.dataDir}; then
|
if ! test -e ${cfg.dataDir}; then
|
||||||
mkdir -m 0770 -p '${cfg.dataDir}'
|
mkdir -m 0770 -p '${cfg.dataDir}'
|
||||||
chown '${cfg.user}:${cfg.group}' '${cfg.dataDir}'
|
|
||||||
fi
|
fi
|
||||||
cp '${configFile}' '${cfg.dataDir}/liquid.conf'
|
cp '${configFile}' '${cfg.dataDir}/liquid.conf'
|
||||||
chmod o-rw '${cfg.dataDir}/liquid.conf'
|
chmod o-rw '${cfg.dataDir}/liquid.conf'
|
||||||
chown '${cfg.user}:${cfg.group}' '${cfg.dataDir}/liquid.conf'
|
chown '${cfg.user}:${cfg.group}' '${cfg.dataDir}'
|
||||||
echo "rpcpassword=$(cat /secrets/liquid-rpcpassword)" >> '${cfg.dataDir}/liquid.conf'
|
echo "rpcpassword=$(cat /secrets/liquid-rpcpassword)" >> '${cfg.dataDir}/liquid.conf'
|
||||||
echo "mainchainrpcpassword=$(cat /secrets/bitcoin-rpcpassword)" >> '${cfg.dataDir}/liquid.conf'
|
echo "mainchainrpcpassword=$(cat /secrets/bitcoin-rpcpassword)" >> '${cfg.dataDir}/liquid.conf'
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user