iu5jae / pYSFReflector

YSF Reflector
GNU General Public License v3.0
24 stars 16 forks source link

Install #19

Closed bearofbarham closed 1 year ago

bearofbarham commented 3 years ago

Hi, Please could you write details on how you actually install a Python YSF Reflector

Thank you, Bear

9Y4C commented 3 years ago

All the instructions are located within the git hub files, but if you can't understand it, contact me direct

bearofbarham commented 3 years ago

Hi Thanks, how do I contact you Directly.

cheers, Paul

------ Original Message ------ From: "bigaone22" @.> To: "iu5jae/pYSFReflector" @.> Cc: "bearofbarham" @.>; "Author" @.> Sent: 15/07/2021 17:13:56 Subject: Re: [iu5jae/pYSFReflector] Install (#19)

All the instructions are located within the git hub files, but if you can't understand it, contact me direct

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iu5jae/pYSFReflector/issues/19#issuecomment-880830339, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU3PR265LU6DKDTRF6GJLMLTX4CMJANCNFSM5ANY4UZQ.

9Y4C commented 3 years ago
  1. Log into system as root
  2. Install python using this command- apt-get install python
  3. Install pip3 using - apt-get install python3-pip3
  4. Change directories.- Cd /opt
  5. Download git file - git clone https://github.com/iu5jae/pYSFReflector.git
  6. Do an ls –la to ensure files was downloaded
  7. Cd into pYSFReflector folder - Cd pYSFReflector
  8. Open YSFReflector.ini to configure with call sign, reflector name description and location of deny.db. a. Sudo nano YSFReflector.ini b. Move deny.db to /usr/local/etc/ - mv deny.db /usr/local/etc/
  9. Execute the python script to start the reflector. python3 ./YSFReflector /opt/pYSFReflector/YSFReflector.ini Automatic Boot
  10. Setting up the reflector to start on boot a. Add a group named mmdvm to your system-groups with: sudo groupadd mmdvm b. add the system-user mmdvm to your users with: sudo useradd mmdvm -g mmdvm -s /sbin/nologin c. make the logdir configured in your YSFReflector.ini owned by mmdvm for example like this: d. sudo chown -R mmdvm:mmdvm /var/log/YSFReflector e. There is a script in the directory /opt/pYSFReflector/systemd named YSFReflector.service this is a systemd-startup-script. f. Open it with this command – sudo nano /opt/pYSFreflector/systemd/YSFReflector.service Edit the locations for where python3 is the ysf_binary and YSFReflector.ini files are located on your system g. Now copy the file (as root) into /etc/systemd/system using this command cp YSFReflector.service /etc/systemd/system h. Then use this command to enable the service - sudo systemctl enable YSFReflector.service Systemd commands Use the following commands to manipulate the reflector functions Starts the reflector if it is not running - sudo systemctl start YSFReflector.service Stops the reflector if it is running - sudo systemctl stop YSFReflector.service Restarts a running reflector (for example after making changes to YSFReflector.ini) - sudo systemctl restart YSFReflector.service Shows the actual running state of the reflector - sudo systemctl status YSFReflector.service

dex.9y4c@gmail.com

bearofbarham commented 3 years ago

Installation on raspberry with raspios buster: preliminary operations: sudo apt update sudo apt upgrade sudo reboot .... after the reboot: sudo apt install git git clone https://github.com/iu5jae/pYSFReflector.git

copy necessary files: cd pYSFReflector sudo cp YSFReflector /usr/local/bin/ sudo cp YSFReflector.ini /usr/local/etc/ sudo cp deny.db /usr/local/etc/ edit the .ini and .db file as needed (in /usr/local/etc) Service file creation: (If the raspberry is dedicated to the reflector we can run the service as root) cd

nano YSFReflector.service file content: [Unit] Description=YSFReflector After=network.target [Service] ExecStartPre=/bin/sleep 1 Type=simple User=root Group=root Restart=always

Modify for different location of Python3 or location of files

ExecStart=/usr/bin/python3 /usr/local/bin/YSFReflector /usr/local/etc/YSFReflector.ini [Install] WantedBy = multi-user.target

copy of the service file:

sudo cp ./YSFReflector.service /lib/systemd/system

service management:

sudo systemctl start YSFReflector.service sudo systemctl stop YSFReflector.service sudo systemctl restart YSFReflector.service sudo systemctl status YSFReflector.service sudo systemctl enable YSFReflector.service sudo systemctl disable YSFReflector.service

scubastu01 commented 1 year ago

I followed the instructions above, but I get an error when trying to execute the python script.

I am typing "python3 ./YSFReflector /opt/pYSFReflector/YSFReflector.ini" and I get back "Python3: can;t open file '/YSFReflector' : [ERRno 2] No such file or directory

I don't see a step where I should have created this folder. Am I missing something?

bearofbarham commented 1 year ago

Hi, see the correct install info from the Author, the old text was incorrect.

scubastu01 commented 1 year ago

ok, where is the install info from the Author? I don't see anything else from [9Y4C]

bearofbarham commented 1 year ago

9y4ç is wrong, please follow the new text pasted above your 1st message, it mentions Raspberry pi, I set mine up on a pi 3a, it doesnt like pi 4,s and I used a fresh install of Raspberry pi software then accessed it using extermal ssh software in windows

scubastu01 commented 1 year ago

Oh, ok. I was ignoring that because I'm not setting it up on a Raspberry Pi.

Thanks,

bearofbarham commented 1 year ago

The Author is not 9y4ç

bearofbarham commented 1 year ago

Hi, what r u setting it up on, the setup should be the same for ubuntu, etc, I just used a pi 3 because it uses such a small amount of power when left on 24/7

scubastu01 commented 1 year ago

Setting up on my cloud server running ubuntu.