net/storj: add an rc script for storagenode
This creates a user, folder and rc script to run storagenode as a service.
This commit is contained in:
parent
74e9e468ec
commit
95b77b6d4d
2
GIDs
2
GIDs
@ -809,7 +809,7 @@ opensearch:*:855:
|
|||||||
# free: 865
|
# free: 865
|
||||||
# free: 866
|
# free: 866
|
||||||
# free: 867
|
# free: 867
|
||||||
# free: 868
|
storj:*:868:
|
||||||
keyd:*:869:
|
keyd:*:869:
|
||||||
buildbot:*:870:
|
buildbot:*:870:
|
||||||
# free: 871
|
# free: 871
|
||||||
|
2
UIDs
2
UIDs
@ -814,7 +814,7 @@ opensearch:*:855:855::0:0:opensearch user:/nonexistent:/usr/sbin/nologin
|
|||||||
# free: 865
|
# free: 865
|
||||||
# free: 866
|
# free: 866
|
||||||
# free: 867
|
# free: 867
|
||||||
# free: 868
|
storj:*:868:868::0:0:Storj Daemon User:/var/db/storj:/usr/sbin/nologin
|
||||||
keyd:*:869:869::0:0:Key remapping daemon for evdev:/nonexistent:/usr/sbin/nologin
|
keyd:*:869:869::0:0:Key remapping daemon for evdev:/nonexistent:/usr/sbin/nologin
|
||||||
buildbot:*:870:870::0:0:Buildbot user:/var/db/buildbot:/usr/sbin/nologin
|
buildbot:*:870:870::0:0:Buildbot user:/var/db/buildbot:/usr/sbin/nologin
|
||||||
archiva:*:871:871::0:0:Apache Archiva Daemon:/nonexistent:/usr/sbin/nologin
|
archiva:*:871:871::0:0:Apache Archiva Daemon:/nonexistent:/usr/sbin/nologin
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
PORTNAME= storj
|
PORTNAME= storj
|
||||||
PORTVERSION= 1.68.2
|
PORTVERSION= 1.68.2
|
||||||
PORTREVISION= 1
|
PORTREVISION= 2
|
||||||
DISTVERSIONPREFIX= v
|
DISTVERSIONPREFIX= v
|
||||||
CATEGORIES= net
|
CATEGORIES= net
|
||||||
|
|
||||||
@ -21,6 +21,12 @@ STORJ_CMDS= certificates crashcollect identity inspector metric-receiver \
|
|||||||
|
|
||||||
GO_TARGET= ${STORJ_CMDS:S,^,./cmd/,}
|
GO_TARGET= ${STORJ_CMDS:S,^,./cmd/,}
|
||||||
|
|
||||||
|
USERS= storj
|
||||||
|
GROUPS= storj
|
||||||
|
USE_RC_SUBR= storagenode
|
||||||
|
SUB_LIST= USER=${USERS} GROUP=${GROUPS}
|
||||||
|
PLIST_SUB= USER=${USERS} GROUP=${GROUPS}
|
||||||
|
|
||||||
post-stage:
|
post-stage:
|
||||||
# Avoid conflict with `graphics/mesa-demos'
|
# Avoid conflict with `graphics/mesa-demos'
|
||||||
@${MV} ${STAGEDIR}${PREFIX}/bin/identity \
|
@${MV} ${STAGEDIR}${PREFIX}/bin/identity \
|
||||||
|
31
net/storj/files/storagenode.in
Executable file
31
net/storj/files/storagenode.in
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# PROVIDE: storagenode
|
||||||
|
# REQUIRE: DAEMON
|
||||||
|
# KEYWORD: shutdown
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
: ${storagenode_enable:=NO}
|
||||||
|
: ${storagenode_config_dir:=/var/db/storj/storagenode}
|
||||||
|
: ${storagenode_identity_dir:=/var/db/storj/identity/storagenode}
|
||||||
|
: ${storagenode_user:=%%USER%%}
|
||||||
|
: ${storagenode_group:=%%GROUP%%}
|
||||||
|
|
||||||
|
name="storagenode"
|
||||||
|
rcvar=storagenode_enable
|
||||||
|
pidfile="/var/run/storagenode.pid"
|
||||||
|
command="/usr/sbin/daemon"
|
||||||
|
command_args="-r -f -P ${pidfile} \
|
||||||
|
%%PREFIX%%/bin/storagenode run \
|
||||||
|
--confir-dir ${storagenode_config_dir} \
|
||||||
|
--identity-dir ${storagenode_identity_dir}"
|
||||||
|
|
||||||
|
start_precmd=storagenode_prestart
|
||||||
|
storagenode_prestart()
|
||||||
|
{
|
||||||
|
install -g ${storagenode_group} -o ${storagenode_user} -- /dev/null ${pidfile}
|
||||||
|
}
|
||||||
|
|
||||||
|
load_rc_config $name
|
||||||
|
run_rc_command "$1"
|
@ -11,3 +11,8 @@ bin/storj-identity
|
|||||||
bin/storj-sim
|
bin/storj-sim
|
||||||
bin/uplink
|
bin/uplink
|
||||||
bin/versioncontrol
|
bin/versioncontrol
|
||||||
|
@owner %%USER%%
|
||||||
|
@group %%GROUP%%
|
||||||
|
@dir /var/db/storj/identity
|
||||||
|
@dir /var/db/storj/storagenode
|
||||||
|
@dir /var/db/storj
|
||||||
|
Loading…
Reference in New Issue
Block a user