In hindsight, what other daemon am I going to be using for Emacs? It's not like I'll be starting two different servers! Even if I was, Emacs has the ability to assign a new unique name for the server depending on if another server is already running. Also, having a name for the main server makes it harder for other services (such as notmuch-mua.service) to find your Emacs instance.
13 lines
222 B
Desktop File
13 lines
222 B
Desktop File
[Unit]
|
|
Description=Emacs
|
|
|
|
[Service]
|
|
Type=forking
|
|
ExecStart=/usr/local/bin/emacs --bg-daemon
|
|
ExecStop=/usr/local/bin/emacsclient --eval "(kill-emacs)"
|
|
Restart=on-failure
|
|
TimeoutStartSec=0
|
|
|
|
[Install]
|
|
WantedBy=default.target
|