Skip to content

Commit

Permalink
Add an upstart config example
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrownus committed Apr 14, 2016
1 parent faa6bc0 commit ae83709
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ rules:
- -a exit,always -F arch=b32 -S execve
```

##### Running as a service

Check the `contrib` folder, it contains examples for how to run `go-audit` as a proper service on your machine.

## FAQ

Expand Down
21 changes: 21 additions & 0 deletions contrib/upstart.go-audit.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
description "go-audit server"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 10 5

script
# Catch any output from stdout/stderr and forward to syslog
rm -f "/tmp/go-audit.log"
mkfifo "/tmp/go-audit.log"
(setsid logger -t"go-audit" <"/tmp/go-audit.log" &)
exec >"/tmp/go-audit.log" 2>"/tmp/go-audit.log"
rm "/tmp/go-audit.log"

# There can be only one auditd
/etc/init.d/auditd stop

exec /usr/local/bin/go-audit
end script

0 comments on commit ae83709

Please sign in to comment.