forked from freicoin/freicoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request freicoin#15 from aitorpazos/master
Systemd's .service file and some documentation about it (merge freicoin#15)
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description=Freicoin's distributed currency daemon | ||
After=network.target | ||
[Service] | ||
User=freicoind | ||
Group=freicoind | ||
Type=forking | ||
PIDFile=/var/lib/freicoind/freicoind.pid | ||
ExecStart=/usr/bin/freicoind -daemon -pid=/var/lib/freicoind/freicoind.pid -conf=/etc/freicoind.conf -datadir=/var/lib/freicoind | ||
Restart=always | ||
PrivateTmp=true | ||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
SYSTEMD SUPPORT IN FREICOIN | ||
=========================== | ||
|
||
Packagers can find a .service file in this repo in order to integrate freicoin's | ||
daemon into systemd based distributions. | ||
|
||
freicoin.service file is located in contrib/systemd/ folder. | ||
|
||
1. Users | ||
--------------------------------- | ||
|
||
This .service file assumes freicoind user and group exist in the system, so packager | ||
should make sure they are created on installation. | ||
|
||
2. Files | ||
--------------------------------- | ||
|
||
The .service file assumes several paths that might need to be adjusted according | ||
to packager's needs. | ||
|
||
Daemon's config file is assumed to be located at /etc/freicoind.conf (you can | ||
use contrib/debian/examples/freicoin.conf as an example). Once installed, users | ||
must edit the file in order to update at least these two | ||
values: rpcuser and rpcpassword . Failing to do so will make the daemon fail | ||
to boot. However, the message written to /var/lib/freicoind/debug.log file is | ||
very helpful and no default values should be set: | ||
|
||
YYYY-MM-DD HH:MM:DD Error: To use the "-daemon" option, you must set a rpcpassword in the configuration file: | ||
/etc/freicoind.conf | ||
It is recommended you use the following random password: | ||
rpcuser=freicoinrpc | ||
rpcpassword=6q1EG75KyvoFXjgfUPXtEKqfDKJJyyXaMSMsBY21jAUb | ||
(you do not need to remember this password) | ||
The username and password MUST NOT be the same. | ||
If the file does not exist, create it with owner-readable-only file permissions. | ||
It is also recommended to set alertnotify so you are notified of problems; | ||
for example: alertnotify=echo %s | mail -s "Freicoin Alert" [email protected] | ||
|
||
|
||
Daemon's data and pid files will be stored in /var/lib/freicoind directory, so it | ||
should be created on installation and make freicoind user/group it's owner. | ||
|
||
3. Installing .service file | ||
--------------------------------- | ||
|
||
Installing this .service file consists on just copying it to /usr/lib/systemd/system | ||
directory, followed by the command "systemctl daemon-reload" in order to update | ||
running systemd configuration. |