diff --git a/readme.md b/readme.md index 6455621..46b92a6 100644 --- a/readme.md +++ b/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`. +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 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`. + + +## Notes + +Word list from [Morgenstern2573/wordle_clone](https://github.com/Morgenstern2573/wordle_clone/blob/master/build/words.js) on GitHub. diff --git a/wordguess.service b/wordguess.service new file mode 100644 index 0000000..35049f9 --- /dev/null +++ b/wordguess.service @@ -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 \ No newline at end of file