emacs --daemon
# note: the `-a ""` part will start emacs server if not running
nohup emacsclient -a "" -c >/dev/null 2>&1 &
# https://emacs.stackexchange.com/questions/21643/what-do-i-do-when-emacs-is-frozen
pkill -SIGUSR2 emacs
;; https://unix.stackexchange.com/questions/150341/how-to-stop-emacs-server
;; vanilla emacs: M-0 M-x server-mode
;; spacemacs: SPC SPC server-mode C-u 0 RET
(server-mode 0)