Skip to content

Instantly share code, notes, and snippets.

@najashark
Last active March 21, 2018 05:23
Show Gist options
  • Save najashark/61f4e825f7966b1b78070b1c4892aabe to your computer and use it in GitHub Desktop.
Save najashark/61f4e825f7966b1b78070b1c4892aabe to your computer and use it in GitHub Desktop.
[Unit]
Description=Moloch Demo Elasticsearch
After=network.target
[Service]
Type=simple
Restart=on-failure
StandardOutput=tty
Environment=ES_DIR=/data/moloch
Environment=ES_NODE_NAME=pins-sbvm
Environment=ES_HTTP_PORT=9200
Environment=ES_TRANSPORT_PORT=9300
Environment=ES_HEAP_SIZE=2G
ExecStart=/bin/su -s /bin/sh -c 'exec "$0" "$@" > /dev/null' nobody -- /data/moloch/elasticsearch/bin/elasticsearch -Des.default.path.conf=/data/moloch/etc
[Install]
WantedBy=multi-user.target
tail /data/moloch/logs/capture.log
/data/moloch/db/db.pl localhost:9200
/data/moloch/db/db.pl localhost:9200 upgrade
/data/moloch/db/db.pl localhost:9200 init
/data/moloch/db/db.pl localhost:9200 upgrade
sudo systemctl status molochviewer.service molochcapture.service
sudo systemctl status elasticsearch.service
tail /data/moloch/logs/capture.log
sudo lsof -i -P
ifconfig
ifconfig|grep "(LISTEN
sudo lsof -i -P|grep LISTEN
cat /var/log/cuckoo_install.log
cat /var/log/cuckoo_install.log |grep moloch
/data/moloch/bin/moloch_add_user.sh admin "Admin User" password --admin
[Unit]
Description=Moloch Capture
After=network.target elasticsearch.service
Requires=network.target elasticsearch.service
[Service]
Type=simple
Restart=on-failure
StandardOutput=tty
ExecStartPre=-/data/moloch/bin/moloch_config_interfaces.sh
ExecStart=/bin/sh -c 'sleep 5 && /data/moloch/bin/moloch-capture -c /data/moloch/etc/config.ini >> /data/moloch/logs/capture.log 2>&1'
WorkingDirectory=/data/moloch
LimitCORE=infinity
[Install]
WantedBy=multi-user.target
[Unit]
Description=Moloch Viewer
After=network.target elasticsearch.service
Requires=network.target elasticsearch.service
[Service]
Type=simple
Restart=always
StandardOutput=tty
ExecStart=/bin/sh -c 'sleep 5 && /data/moloch/bin/node viewer.js -c /data/moloch/etc/config.ini >> /data/moloch/logs/viewer.log 2>&1'
WorkingDirectory=/data/moloch/viewer
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment