-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ui-v2' of github.com:IGS/gEAR into ui-v2
- Loading branch information
Showing
5 changed files
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# system.d files | ||
|
||
These are service files to place in `/etc/systemd/system/` to run as a service. | ||
|
||
The "@" in the service file name indicates that this file is a template file. You can spawn off workers off of this template by appending numbers after the "@". For instance, if you have a "[email protected]" template, you can spawn off "[email protected]", "[email protected]", etc. You can also just use the ".target" file to group all these workers together as a service rather than having to start each indiviudally. See https://www.stevenrombauts.be/2019/01/run-multiple-instances-of-the-same-systemd-unit/ for more info on all this. | ||
|
||
## Non-persisting start | ||
|
||
To start the service run `sudo systemctl start <service_filename>`. If any changes are made to the service run `sudo systemctl daemon-reload`, and then run the "start" command again. This will not persist during a reboot. | ||
|
||
## Reboot-persisting start | ||
|
||
To start a service that persists during a reboot, run `sudo systemctl enable <service_filename>`. After enabling, you will still need to run the `systemctl start` command to start on this boot session. | ||
|
||
## Notes | ||
|
||
* For a service that is supposed to persist, like a RabbitMQ consumer, use Service->Type=Simple. If you use Type->Forking, I believe systemctl will forever wait for the forked process to exit and return to command line. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Unit] | ||
Description=ProjectR Consumer Workers | ||
[email protected] [email protected] [email protected] | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description="ProjectR Consumer for RabbitMQ - #%i" | ||
Documentation=https://github.com/IGS/gEAR/blob/main/docs/setup_rabbitmq.md | ||
After=rabbitmq-server.service | ||
|
||
[Service] | ||
Type=simple | ||
Environment=APACHE_STARTED_BY_SYSTEMD=true | ||
ExecStart=/opt/bin/python3 /home/jorvis/git/gEAR/listeners/projectr_consumer.py | ||
KillMode=mixed | ||
PrivateTmp=true | ||
Restart=always | ||
RestartSec=2s | ||
StartLimitIntervalSec=0 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters