Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LaaS
logstash-forwarder
Commits
c8cb3ec0
Commit
c8cb3ec0
authored
Jul 31, 2013
by
Jordan Sissel
Browse files
- more fixes for the init script
- don't log prospecting, it's noisy.
parent
8a541d76
Changes
3
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
c8cb3ec0
VERSION
=
0.1.
0
VERSION
=
0.1.
1
# By default, all dependencies (zeromq, etc) will be downloaded and installed
# locally. You can change this if you are deploying your own.
...
...
lumberjack.init
100644 → 100755
View file @
c8cb3ec0
...
...
@@ -21,19 +21,20 @@ DAEMON_ARGS="-config /opt/lumberjack/lumberjack.conf -spool-size 100 -log-to-sys
PIDFILE
=
/var/run/
$NAME
.pid
SCRIPTNAME
=
/etc/init.d/
$NAME
COMMAND
=
"cd /var/run; exec
$DAEMON
$DAEMON_ARGS
"
[
-r
/etc/default/
$NAME
]
&&
.
/etc/default/
$NAME
.
/lib/init/vars.sh
.
/lib/lsb/init-functions
do_start
()
{
# Skip if it's already running
start-stop-daemon
--start
--quiet
--pidfile
$PIDFILE
\
--exec
$DAEMON
--test
>
/dev/null
||
return
1
start-stop-daemon
--start
--quiet
--pidfile
$PIDFILE
--exec
/bin/sh
--test
>
/dev/null
||
return
1
cd
/var/run
# Actually start it now.
start-stop-daemon
--start
--quiet
--make-pidfile
--background
\
--pidfile
$PIDFILE
--exec
$DAEMON
--
$DAEMON_ARGS
||
return
2
--pidfile
$PIDFILE
--exec
/bin/sh
--
-c
"
$COMMAND
"
||
return
2
}
do_stop
()
...
...
prospector.go
View file @
c8cb3ec0
...
...
@@ -73,7 +73,7 @@ func resume_tracking(fileconfig FileConfig, fileinfo map[string]os.FileInfo, out
func
prospector_scan
(
path
string
,
fields
map
[
string
]
string
,
fileinfo
map
[
string
]
os
.
FileInfo
,
output
chan
*
FileEvent
)
{
log
.
Printf
(
"Prospecting %s
\n
"
,
path
)
//
log.Printf("Prospecting %s\n", path)
// Evaluate the path as a wildcards/shell glob
matches
,
err
:=
filepath
.
Glob
(
path
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment