Control service with systemd

How to setup a new service with systemd.

In this example the service name is grumpy.
cp grumpy.service /lib/systemd/system/
chmod 777 /lib/systemd/system/grumpy.service
systemctl daemon-reload
systemctl enable grumpy.service
systemctl start grumpy
systemctl status grumpy

Filename: grumpy.service
[Unit] Description=grumpy example service After=auditd.service systemd-user-sessions.service [Service] User=gregory TimeoutStartSec=0 Type=simple KillMode=process WorkingDirectory=/tmp/ ExecStart=/home/gregory/bin/grumpy Restart=always RestartSec=2 LimitNOFILE=5555 [Install]