/etc/systemd/system
/lib/systemd/system
systemctl status
systemctl status myapp
systemctl restart myapp
systemctl reload myapp
systemctl start myapp
systemctl stop myapp
systemctl enable myapp
systemctl disable myapp
systemctl --failedjournalctl -f # like tail -f
journalctl -u unitname
journalctl -b # since last boot
journalctl -n 100
journalctl --since yesterday
journalctl -o json # different outputs
journalctl -p 3..6 # filtering by priority[Unit]
Description=%I Sidekiq Daemon
Documentation=https://github.com/monterail/ansible-sidekiq
StopWhenUnneeded=yes
PartOf=%i.target
[Service]
User=%i
WorkingDirectory=/home/%i/app/current
ExecStart=/bin/bash -lc './bin/sidekiq -C ./config/sidekiq.yml'
EnvironmentFile=/home/%i/.env
Restart=always
KillMode=process
Type=simple/etc/systemd/system/sidekiq@.service
systemctl enable sidekiq@myapp.service
root@development:~# ls -l /etc/systemd/system/tailored_core.target.wants/
total 0
... core-coordinator.service -> /etc/systemd/system/core-coordinator.service
... sidekiq@tailored_core.service -> /etc/systemd/system/sidekiq@.service
... unicorn@tailored_core.service -> /etc/systemd/system/unicorn@.service