User Tools

Site Tools


simple-bpq-telnet-application

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
simple-bpq-telnet-application [2024/11/29 14:39] kc2ihxsimple-bpq-telnet-application [2024/11/29 14:57] (current) kc2ihx
Line 5: Line 5:
   - Create a location for the script, data, and a python ''venv''   - Create a location for the script, data, and a python ''venv''
   - Write the script   - Write the script
 +  - Add the application to ''BPQ32.cfg''
   - Setup a ''systemd'' service to keep it running.   - Setup a ''systemd'' service to keep it running.
  
Line 96: Line 97:
 ===== Configuring this as a service ===== ===== Configuring this as a service =====
 Next we'll configure a ''systemd'' service to make sure this script is always running and ready to accept connections. Next we'll configure a ''systemd'' service to make sure this script is always running and ready to accept connections.
-//todo write block describing adding a service to run this script// 
  
 +I created this file as a "user" service, as ''~/.config/systemd/user/rick.service'', but it should probably run as a system service:
  
 +<code>
 +# service for RRoAX25 server
 +# replace USER with the username under which you created the bpq-apps venv
  
 +[Unit]
 +Description="RRoAX25 service"
 +After=network.target
  
 +[Service]
 +Type=simple
 +WorkingDirectory=/home/USER/.local/bpq-apps/
 +ExecStart=/home/USER/.local/bpq-apps/bin/python /home/USER/.local/bpq-apps/scripts/rick.py -p 10001 -f /home/USER/.local/bpq-apps/data/messages.json
 +Restart=always
 +
 +[Install]
 +WantedBy=default.target
 +</code>
 +
 +Activate it by running:
 +<code>
 +systemctl --user enable rick.service
 +systemctl --user start rick.service
 +</code>
 +
 +Then check the status to confirm it is working:
 +
 +<code>
 +systemctl --user status rick.service
 +</code>
 +
 +If you need to edit the service file, reload it with:
 +<code>
 +systemctl --user daemon-reload
 +</code>
simple-bpq-telnet-application.1732891195.txt.gz · Last modified: 2024/11/29 14:39 by kc2ihx