Skip to content

Commit d28a4a6

Browse files
Use autostart script again for domlogo since systemd service doesn't work anymore
1 parent f430f46 commit d28a4a6

File tree

4 files changed

+11
-28
lines changed

4 files changed

+11
-28
lines changed

provision-contest/ansible/roles/domlogo/files/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ First, create the following files:
55
- `images/photos/crew.png`, an image with a width of 1024 (and any height) to show for teams without a photo.
66
- `images/photos/idle.png`, an image with a width of 1024 (and any height) to show when the judgedaemon is idle.
77

8-
Next, add the needed Python dependencies to the `lib` folder, within a folder called `python3.10`. You can copy this
8+
Next, add the needed Python dependencies to the `lib` folder, within a folder called `python3.12`. You can copy this
99
folder from a local machine and it should contain the `FreeSimpleGUI` and `requests` Python packages.
1010

1111
Optionally you can create a file `images/config.yaml` with something like:

provision-contest/ansible/roles/domlogo/tasks/main.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
- name: Fix ownership of domlogo env
2727
file:
28-
path: "/home/domjudge/.local/lib/python3.10"
28+
path: "/home/domjudge/.local/lib/python3.12"
2929
recurse: true
3030
owner: domjudge
3131
group: domjudge
@@ -46,11 +46,8 @@
4646

4747
- name: Copy domlogo systemd unit file
4848
template:
49-
src: "domlogo.service.j2"
50-
dest: "/etc/systemd/system/domlogo.service"
51-
52-
- name: Enable and start domlogo
53-
systemd:
54-
name: domlogo
55-
enabled: true
56-
state: started
49+
src: "domlogo.desktop.j2"
50+
dest: "/home/domjudge/.config/autostart/domlogo.desktop"
51+
owner: domjudge
52+
group: domjudge
53+
mode: 0755
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[Desktop Entry]
2+
Name=domlogo
3+
Type=Application
4+
Exec=env REQUESTS_CA_BUNDLE=/usr/local/share/ca-certificates/domserver.crt bash -c "sleep 3; cd {{ DJ_DIR }}; python3 ./domlogo.py"

provision-contest/ansible/roles/domlogo/templates/domlogo.service.j2

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)