diff --git a/install/Service-README.md b/install/Service-README.md new file mode 100644 index 00000000..367360d8 --- /dev/null +++ b/install/Service-README.md @@ -0,0 +1,21 @@ +# Services + +In this install folder there are two service files. + +To set up these services, first move them into the `/etc/systemd/system/` directory. + +From there, you can use the following commands to manage the services: + +`systemctl start ` +*Start the service* + +`systemctl enable ` +*Enables the service so it will start after future reboots* + +`systemctl status ` +*Displays basic information about the status of the service (i.e. whether it is running or not)* + +`journalctl -u ` +*Displays service stdout logs, useful for if a service crashes and you need to debug* + + diff --git a/install/block-editor.service b/install/block-editor.service new file mode 100644 index 00000000..78813ddb --- /dev/null +++ b/install/block-editor.service @@ -0,0 +1,12 @@ +[Unit] +Description=Block Code Editor Web Server +After=network.target + +[Service] +User=admin +WorkingDirectory=/home/admin/project-blastpad/flask +ExecStart=flask --app serve run +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/install/launcher-gui.service b/install/launcher-gui.service new file mode 100644 index 00000000..3e56d167 --- /dev/null +++ b/install/launcher-gui.service @@ -0,0 +1,15 @@ +[Unit] +Description=Launcher GUI +After=graphical.target +Wants=graphical.target + +[Service] +Type=simple +User=admin +Environment="DISPLAY=:0" +Environment="XAUTHORITY=/home/admin/.Xauthority" +ExecStart=/bin/bash -c "export DISPLAY=:0; /usr/bin/python3 /home/admin/project-blastpad/home/homeScreenGui.py" +Restart=always + +[Install] +WantedBy=graphical.target