Systemd

Services

https://wiki.archlinux.org/index.php/Systemd#Writing_unit_files

|~$ \cat /etc/systemd/system/plop.service
[Unit]
Description=Plopiplop

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/bin/plop.sh
ExecStop=/bin/kill ${MAINPID}
KillSignal=SIGKILL

[Install]
WantedBy=multi-user.target
sudo systemctl enable plop.service