Skip to content

Commit

Permalink
Adding systemd files to MozDef.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phrozyn committed Aug 23, 2016
1 parent db91d3a commit 71f2a32
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 0 deletions.
Empty file added .sonar/.sonar_lock
Empty file.
45 changes: 45 additions & 0 deletions config/mongod.conf
@@ -0,0 +1,45 @@
# mongod.conf

# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/

# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /opt/mozdef/envs/mozdef/logs/meteor-mongo.log

# Where and how to store data.
storage:
dbPath: /opt/mozdef/envs/mongo/db
journal:
enabled: true
mmapv1:
smallFiles: true
# wiredTiger:

# how the process runs
processManagement:
fork: true # fork and run in background
pidFilePath: /var/run/mozdefdb/mozdefdb.pid # location of pidfile

# network interfaces
net:
port: 3002
bindIp: 127.0.0.1 # Listen to local interface only, comment to listen on all interfaces.


#security:

#operationProfiling:

replication:
oplogSizeMB: 8

#sharding:

## Enterprise-Only Options

#auditLog:

#snmp:
17 changes: 17 additions & 0 deletions systemdfiles/\
@@ -0,0 +1,17 @@
[Unit]
Description=MongoDB Database Service
After=network.target

[Service]
Type=forking
PIDFile=/var/run/mozdefdb/mozdefdb.pid
ExecStart=/usr/bin/mongod --config /etc/mongod.conf
ExecReload=/bin/kill -HUP $MAINPID
#Restart=always
User=mozdef
Group=mozdef
StandardOutput=syslog
StandardError=syslog

[Install]
WantedBy=multi-user.target
16 changes: 16 additions & 0 deletions systemdfiles/kibana.service
@@ -0,0 +1,16 @@
[Unit]
Description=Kibana
Requires=elasticsearch.service

[Service]
ExecStart=/opt/mozdef/envs/kibana/bin/kibana
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=kibana4
User=mozdef
Group=mozdef
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target
17 changes: 17 additions & 0 deletions systemdfiles/mongod.service
@@ -0,0 +1,17 @@
[Unit]
Description=MongoDB Database Service
After=network.target

[Service]
Type=forking
PIDFile=/var/run/mozdefdb/mozdefdb.pid
ExecStart=/usr/bin/mongod --config /etc/mongod.conf
ExecReload=/bin/kill -HUP $MAINPID
#Restart=always
User=mozdef
Group=mozdef
StandardOutput=syslog
StandardError=syslog

[Install]
WantedBy=multi-user.target

0 comments on commit 71f2a32

Please sign in to comment.