go-exploitdb: change default log dir path

This commit is contained in:
Yury Martynov 2019-09-16 10:02:51 +03:00
parent ba06dc26e4
commit 3c5022dfac
No known key found for this signature in database
GPG key ID: EBE62DD0CCEAE19E
3 changed files with 16 additions and 6 deletions

View file

@ -0,0 +1,12 @@
diff -ur a/src/github.com/mozqnet/go-exploitdb/util/util.go b/src/github.com/mozqnet/go-exploitdb/util/util.go
--- a/src/github.com/mozqnet/go-exploitdb/util/util.go 2019-09-11 12:36:44.000000000 +0300
+++ b/src/github.com/mozqnet/go-exploitdb/util/util.go 2019-09-15 09:28:51.065415171 +0300
@@ -33,7 +33,7 @@
// GetDefaultLogDir :
func GetDefaultLogDir() string {
- defaultLogDir := "/var/log/go-exploitdb"
+ defaultLogDir := "/var/log/vuls"
if runtime.GOOS == "windows" {
defaultLogDir = filepath.Join(os.Getenv("APPDATA"), "go-exploitdb")
}

View file

@ -26,8 +26,4 @@ pidfile="/run/${RC_SVCNAME}.pid"
start_stop_daemon_args="--quiet -1 ${GEX_LOGDIR}/${RC_SVCNAME}.log -2 ${GEX_LOGDIR}/${RC_SVCNAME}.log"
retry="TERM/25/KILL/5"
depend() {
need net
}
# vim: set ft=gentoo-init-d ts=4 :

View file

@ -174,17 +174,19 @@ src_prepare() {
-i "${T}"/go-exploitdb.initd || die
fi
eapply "${FILESDIR}"/change_default_logdir.patch
default
}
src_compile() {
GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \
GOPATH="${S}:$(get_golibdir_gopath)" \
GOCACHE="${T}/go-cache" \
go build -v -work -x -ldflags="-X main.version=${PV} -s -w" ./... "${EGO_PN}" || die
}
src_install() {
GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \
GOPATH="${S}:$(get_golibdir_gopath)" \
GOCACHE="${T}/go-cache" \
go install -v -work -x -ldflags="-X main.version=${PV} -s -w" ./... "${EGO_PN}" || die