Skip to content

Commit

Permalink
Update systemd unit files.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed May 27, 2021
1 parent b1b4832 commit f6a9b4d
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ nfpms:
package_name: autocorrector
replacements:
amd64: 64-bit
linux: Tux
linux: Linux
vendor: joshuar
homepage: https://github.com/joshuar/autocorrector
maintainer: Joshua Rich <[email protected]>
Expand All @@ -27,7 +27,7 @@ nfpms:
- libappindicator-gtk3
contents:
- src: autocorrector-server.service
dst: /etc/systemd/system/autocorrector-server.service
dst: /usr/lib/systemd/system/autocorrector-server.service
- src: autocorrector-client.service
dst: /usr/local/share/autocorrector/autocorrector-client.service
- src: LICENSE
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Icon taken from [here](https://pixabay.com/vectors/spellcheck-correct-typo-error

1. Download the latest release in an appropriate format.
2. Copy the files to the appropriate locations:
- `autocorrector-server.service` :arrow_forward: `/etc/systemd/system/autocorrector-server.service` (done automatically for deb/rpm packages)
- `autocorrector-client.service` :arrow_forward: `$HOME/.config/systemd/user/autocorrector-client.service`
- corrections.toml :arrow_forward: `$HOME/.config/autocorrector/corrections.toml`
- `autocorrector-server.service` -> `/usr/lib/systemd/system/autocorrector-server.service` (done automatically for deb/rpm packages)
- `autocorrector-client.service` -> `$HOME/.config/systemd/user/autocorrector-client.service`
- corrections.toml -> `$HOME/.config/autocorrector/corrections.toml`
3. Reload systemd and enable/start the services:
- `sudo systemctl daemon-reload && systemctl --user daemon-reload`
- `sudo systemctl enable autocorrector-server && sudo systemctl start autocorrector-server`
Expand Down
6 changes: 4 additions & 2 deletions autocorrector-client.service
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[Unit]
Description=Autocorrector Client
Description=Autocorrector is a tool similar to Autokey or AutoHotKey, but targeted mainly at word replacements.
Documentation=https://github.com/joshuar/autocorrector/blob/master/README.md

[Service]
Type=exec
RemainAfterExit=yes
Restart=on-abnormal
ExecStart=/usr/local/bin/autocorrector client

[Install]
WantedBy=default.target
WantedBy=graphical.target
8 changes: 5 additions & 3 deletions autocorrector-server.service.tmpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[Unit]
Description=Autocorrector Server
After=syslog.target
Description=Autocorrector is a tool similar to Autokey or AutoHotKey, but targeted mainly at word replacements.
Documentation=https://github.com/joshuar/autocorrector/blob/master/README.md

[Service]
Type=exec
RemainAfterExit=yes
Restart=on-abnormal
PrivateNetwork=yes
ExecStart=/usr/local/bin/autocorrector --user {{.User}}

[Install]
WantedBy=default.target
WantedBy=graphical.target
Loading

0 comments on commit f6a9b4d

Please sign in to comment.