forked from gentoo/gentoo
-
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.
net-p2p/go-ipfs-bin: add services for openrc & systemd
Closes: https://bugs.gentoo.org/643634 Closes: gentoo#9223
- Loading branch information
Showing
4 changed files
with
51 additions
and
1 deletion.
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 @@ | ||
IPFS_PATH=/var/lib/ipfs/.ipfs |
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 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 1999-2018 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
export IPFS_PATH=${IPFS_PATH:-/var/lib/ipfs/.ipfs} | ||
|
||
pidfile="/run/ipfs.pid" | ||
command="/usr/bin/ipfs" | ||
command_args="daemon --enable-gc --migrate" | ||
command_user="ipfs:ipfs" | ||
start_stop_daemon_args="--wait 1000 -b \ | ||
-1 /var/log/ipfs/ipfs.log \ | ||
-2 /var/log/ipfs/ipfs.log" | ||
|
||
depend() { | ||
need net | ||
} |
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,14 @@ | ||
[Unit] | ||
Description=InterPlanetary File System | ||
After=network.target | ||
|
||
[Service] | ||
ExecStart=/usr/bin/ipfs daemon --enable-gc --migrate | ||
ExecStop=/usr/bin/ipfs shutdown | ||
Group=%i | ||
Restart=always | ||
Type=simple | ||
User=%i | ||
|
||
[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