[Unit]
Description=executo
Wants=redis-server.service
After=multi-user.target redis-server.service

[Service]
Type=simple
WorkingDirectory=/data/executo
ExecStart=/usr/local/bin/bundle exec sidekiq -r /data/executo/boot.rb -C /var/apps/our-project/config/sidekiq.yml
User=pi
Group=pi

# if we crash, restart
RestartSec=1
Restart=always

# Logs go to syslog
# View with "sudo journalctl -u executo"
StandardOutput=syslog
StandardError=syslog

# This will default to "bundler" if we don't specify it
SyslogIdentifier=executo

[Install]
WantedBy=multi-user.target