aboutsummaryrefslogtreecommitdiff
path: root/sysutils/ipfs-go
diff options
context:
space:
mode:
authorJohn Hixson <jhixson@FreeBSD.org>2019-01-08 02:11:53 +0000
committerJohn Hixson <jhixson@FreeBSD.org>2019-01-08 02:11:53 +0000
commit96ae020e6abd314bd7008be8de124515c9f5f214 (patch)
tree7a0516a756f825471375b90d53d5f8c66cacef75 /sysutils/ipfs-go
parentf36fad45ad306a52bf53cc1e30019bd76d15dcf5 (diff)
downloadports-96ae020e6abd314bd7008be8de124515c9f5f214.tar.gz
ports-96ae020e6abd314bd7008be8de124515c9f5f214.zip
Notes
Diffstat (limited to 'sysutils/ipfs-go')
-rw-r--r--sysutils/ipfs-go/Makefile1
-rw-r--r--sysutils/ipfs-go/files/ipfs-go.in7
2 files changed, 7 insertions, 1 deletions
diff --git a/sysutils/ipfs-go/Makefile b/sysutils/ipfs-go/Makefile
index eedaf886be6e..509a5bbde46d 100644
--- a/sysutils/ipfs-go/Makefile
+++ b/sysutils/ipfs-go/Makefile
@@ -3,6 +3,7 @@
PORTNAME= ipfs
DISTVERSIONPREFIX= v
DISTVERSION= 0.4.18
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= https://github.com/ipfs/go-ipfs/releases/download/v${DISTVERSION}/
PKGNAMESUFFIX= -go
diff --git a/sysutils/ipfs-go/files/ipfs-go.in b/sysutils/ipfs-go/files/ipfs-go.in
index 63263da72688..0d6093303c80 100644
--- a/sysutils/ipfs-go/files/ipfs-go.in
+++ b/sysutils/ipfs-go/files/ipfs-go.in
@@ -17,6 +17,9 @@
# Default: %%IPFS_USER%%
# ipfs_go_group (str): ipfs_go daemon group
# Default: %%IPFS_GROUP%%
+# ipfs_go_path (str): ipfs_go ipfs repo path
+# Default: %%IPFS_HOME%%
+
. /etc/rc.subr
@@ -27,6 +30,7 @@ load_rc_config $name
: ${ipfs_go_enable:="NO"}
: ${ipfs_go_user:="%%IPFS_USER%%"}
: ${ipfs_go_group:="%%IPFS_GROUP%%"}
+: ${ipfs_go_path:="%%IPFS_HOME%%"}
logfile="%%IPFS_LOGDIR%%/${name}.log"
pidfile="/var/run/${name}.pid"
@@ -36,13 +40,14 @@ start_cmd="ipfs_go_start"
ipfs_go_prestart() {
install -d -o ${ipfs_go_user} -g ${ipfs_go_group} -m750 %%IPFS_LOGDIR%%
- [ -d ~%%IPFS_USER%%/.ipfs ] || /usr/bin/su - ${ipfs_go_user} -c "${command} init"
+ [ -d ${ipfs_go_path} ] || /usr/bin/su - ${ipfs_go_user} -c "env IPFS_PATH=${ipfs_go_path} ${command} init"
}
ipfs_go_start() {
echo running ${command} daemon
export USER=${ipfs_go_user}
export HOME=$(echo ~%%IPFS_USER%%)
+ export IPFS_PATH=${ipfs_go_path}
/usr/sbin/daemon -p ${pidfile} -u ${ipfs_go_user} ${command} daemon >> ${logfile} 2>&1
}