Fixed typo and replaced tab with spaces

This commit is contained in:
nixbitcoin 2019-01-04 10:47:06 +01:00
parent 9ada1d32f3
commit 197155fb0b
No known key found for this signature in database
GPG Key ID: DD11F9AD5308B3BA

View File

@ -33,19 +33,19 @@ in {
systemd.services.electrs = {
description = "Run electrs";
wantedBy = [ "muli-user.target" ];
wantedBy = [ "multi-user.target" ];
requires = [ "bitcoind.service" ];
after = [ "bitcoind.service" ];
# create shell script to start up electrs safely with password parameter
preStart = ''
mkdir -m 0770 -p ${cfg.dataDir}
chown 'electrs:electrs' ${cfg.dataDir}
echo "${pkgs.electrs}/bin/electrs -vvv --timestamp --db-dir ${cfg.dataDir} --daemon-dir /var/lib/bitcoind --cookie=${config.services.bitcoind.rpcuser}:$(cat /secrets/bitcoin-rpcpassword)" > /var/lib/electrs/startscript.sh
chown -R 'electrs:electrs' ${cfg.dataDir}
chmod u+x ${cfg.dataDir}/startscript.sh
'';
chown 'electrs:electrs' ${cfg.dataDir}
echo "${pkgs.electrs}/bin/electrs -vvv --timestamp --db-dir ${cfg.dataDir} --daemon-dir /var/lib/bitcoind --cookie=${config.services.bitcoind.rpcuser}:$(cat /secrets/bitcoin-rpcpassword)" > /var/lib/electrs/startscript.sh
chown -R 'electrs:electrs' ${cfg.dataDir}
chmod u+x ${cfg.dataDir}/startscript.sh
'';
serviceConfig = {
PermissionsStartOnly = "true";
PermissionsStartOnly = "true";
ExecStart = "${pkgs.bash}/bin/bash ${cfg.dataDir}/startscript.sh";
User = "electrs";
Restart = "on-failure";