Use full path in service file
This commit is contained in:
parent
44d661b8f0
commit
0601acd303
2 changed files with 5 additions and 3 deletions
|
@ -10,9 +10,11 @@
|
|||
repo: https://code.acperkins.com/acp/emacs.d.git
|
||||
dest: "{{ ansible_env.HOME }}/.emacs.d"
|
||||
- name: Create Emacs user service (Linux)
|
||||
copy:
|
||||
template:
|
||||
src: emacs.service
|
||||
dest: "{{ ansible_env.HOME }}/.config/systemd/user/emacs.service"
|
||||
vars:
|
||||
prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}"
|
||||
when: ansible_system == 'Linux' and emacs_binary.stat.exists == True
|
||||
- name: Add Emacs server to autostart (FreeBSD)
|
||||
copy:
|
||||
|
|
|
@ -8,8 +8,8 @@ Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=emacs --fg-daemon
|
||||
ExecStop=emacsclient --eval "(kill-emacs)"
|
||||
ExecStart={{ prefix }}/emacs --fg-daemon
|
||||
ExecStop={{ prefix }}/emacsclient --eval "(kill-emacs)"
|
||||
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
|
||||
Restart=on-failure
|
||||
|
Loading…
Reference in a new issue