mirror of
https://github.com/brandon-rozek/wordguess
synced 2024-11-14 20:37:32 -05:00
Systemd user service added
This commit is contained in:
parent
81b7b16c3f
commit
ee214b7986
2 changed files with 31 additions and 0 deletions
19
readme.md
19
readme.md
|
@ -38,6 +38,20 @@ figure out the word for all future days.
|
||||||
|
|
||||||
You can reset the seed and all game state by removing the file `state.pickle`.
|
You can reset the seed and all game state by removing the file `state.pickle`.
|
||||||
|
|
||||||
|
A systemd service file is provided under `wordguess.service` in order to provide another way to run the server.
|
||||||
|
|
||||||
|
Copy `wordguess.service` to `~/.config/systemd/user` and then enable and start the service with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl --user enable --now wordguess
|
||||||
|
```
|
||||||
|
|
||||||
|
To start on boot-up, your user needs to have `Linger` enabled. If you have root access, you can run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo loginctl enable-linger $USER
|
||||||
|
```
|
||||||
|
|
||||||
## Players
|
## Players
|
||||||
|
|
||||||
Players can play the game by running the `client.py` python script.
|
Players can play the game by running the `client.py` python script.
|
||||||
|
@ -55,3 +69,8 @@ python /home/wg/WordGuess/leaderboard.py
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also pass a date with `--date`.
|
You can also pass a date with `--date`.
|
||||||
|
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
Word list from [Morgenstern2573/wordle_clone](https://github.com/Morgenstern2573/wordle_clone/blob/master/build/words.js) on GitHub.
|
||||||
|
|
12
wordguess.service
Normal file
12
wordguess.service
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[Unit]
|
||||||
|
Description=WordGuess server
|
||||||
|
Requires=
|
||||||
|
After=
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=%h/WordGuess/
|
||||||
|
ExecStart=/usr/bin/python server.py
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue