Skip to content

Commit 0201a79

Browse files
committed
Merge pull request #6512
fc25a87 Add note on relative paths, improve formatting (unsystemizer)
2 parents 6c1c7fd + fc25a87 commit 0201a79

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

doc/init.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,26 @@ If bitcoind is run with "-daemon" flag, and no rpcpassword is set, it will
3333
print a randomly generated suitable password to stderr. You can also
3434
generate one from the shell yourself like this:
3535

36-
bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'
36+
`bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'`
3737

38-
Once you have a password in hand, set rpcpassword= in /etc/bitcoin/bitcoin.conf
38+
Once you have a password in hand, set `rpcpassword=` in `/etc/bitcoin/bitcoin.conf`
39+
40+
`conf`, `pid`, and `wallet` accept relative paths which are interpreted as
41+
relative to the data directory. `wallet` *only* supports relative paths.
3942

4043
For an example configuration file that describes the configuration settings,
41-
see contrib/debian/examples/bitcoin.conf.
44+
see `contrib/debian/examples/bitcoin.conf`.
4245

4346
3. Paths
4447
---------------------------------
4548

4649
All three configurations assume several paths that might need to be adjusted.
4750

48-
Binary: /usr/bin/bitcoind
49-
Configuration file: /etc/bitcoin/bitcoin.conf
50-
Data directory: /var/lib/bitcoind
51-
PID file: /var/run/bitcoind/bitcoind.pid (OpenRC and Upstart)
52-
/var/lib/bitcoind/bitcoind.pid (systemd)
53-
Lock file: /var/lock/subsys/bitcoind (CentOS)
51+
Binary: `/usr/bin/bitcoind`
52+
Configuration file: `/etc/bitcoin/bitcoin.conf`
53+
Data directory: `/var/lib/bitcoind`
54+
PID file: `/var/run/bitcoind/bitcoind.pid` (OpenRC and Upstart) or `/var/lib/bitcoind/bitcoind.pid` (systemd)
55+
Lock file: `/var/lock/subsys/bitcoind` (CentOS)
5456

5557
The configuration file, PID directory (if applicable) and data directory
5658
should all be owned by the bitcoin user and group. It is advised for security
@@ -65,29 +67,29 @@ can then be controlled by group membership.
6567

6668
Installing this .service file consists of just copying it to
6769
/usr/lib/systemd/system directory, followed by the command
68-
"systemctl daemon-reload" in order to update running systemd configuration.
70+
`systemctl daemon-reload` in order to update running systemd configuration.
6971

70-
To test, run "systemctl start bitcoind" and to enable for system startup run
71-
"systemctl enable bitcoind"
72+
To test, run `systemctl start bitcoind` and to enable for system startup run
73+
`systemctl enable bitcoind`
7274

7375
4b) OpenRC
7476

7577
Rename bitcoind.openrc to bitcoind and drop it in /etc/init.d. Double
7678
check ownership and permissions and make it executable. Test it with
77-
"/etc/init.d/bitcoind start" and configure it to run on startup with
78-
"rc-update add bitcoind"
79+
`/etc/init.d/bitcoind start` and configure it to run on startup with
80+
`rc-update add bitcoind`
7981

8082
4c) Upstart (for Debian/Ubuntu based distributions)
8183

82-
Drop bitcoind.conf in /etc/init. Test by running "service bitcoind start"
84+
Drop bitcoind.conf in /etc/init. Test by running `service bitcoind start`
8385
it will automatically start on reboot.
8486

8587
NOTE: This script is incompatible with CentOS 5 and Amazon Linux 2014 as they
8688
use old versions of Upstart and do not supply the start-stop-daemon utility.
8789

8890
4d) CentOS
8991

90-
Copy bitcoind.init to /etc/init.d/bitcoind. Test by running "service bitcoind start".
92+
Copy bitcoind.init to /etc/init.d/bitcoind. Test by running `service bitcoind start`.
9193

9294
Using this script, you can adjust the path and flags to the bitcoind program by
9395
setting the BITCOIND and FLAGS environment variables in the file
@@ -99,4 +101,3 @@ setting the BITCOIND and FLAGS environment variables in the file
99101
Auto respawning is currently only configured for Upstart and systemd.
100102
Reasonable defaults have been chosen but YMMV.
101103

102-

0 commit comments

Comments
 (0)