crawler.service

[Unit]
Description=Tos;DR Crawler Server
Requires=network.target

[Service]
Type=simple
User=crawler
Group=crawler
WorkingDirectory=/usr/share/tosdr/crawler
ExecStartPre=/usr/bin/git fetch --all
ExecStartPre=/usr/bin/git reset --hard origin/master
ExecStartPre=/usr/bin/git pull
ExecStartPre=/usr/bin/npm install
ExecStart=/usr/bin/node crawler.js
TimeoutSec=30
RestartSec=15s
Restart=always

[Install]
WantedBy=multi-user.target

TEXT