Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Software] Systemctl

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
mesal
Posts: 1
Joined: 2023-03-19 19:19

[Software] Systemctl

#1 Post by mesal »

Hello, I am looking for assistance with the following issues: I need to enable some services to be sure, these services keep running in the background and/or restart when system rebot.
I am able to do that with four of the five services using "systemctl enable" once I have started the services, however for one of them (P25Reflector.ini) not; When I use "systemctl enable" I get that the service does not exist but I can see the service running, please see systemctl status below:
Since: Sun 2023-03-19 19:03:13 UTC; 2min 54s ago
CGroup: /
├─user.slice
│ └─user-1000.slice
│ ├─user@1000.service
│ │ └─init.scope
│ │ ├─925 /lib/systemd/systemd --user
│ │ └─926 (sd-pam)
│ ├─session-6.scope
│ │ ├─1013 sshd: admin [priv]
│ │ ├─1020 sshd: admin@pts/4
│ │ ├─1021 -bash
│ │ ├─1028 sudo ./MMDVM_Bridge /etc/MMDVM_Bridge.ini
│ │ └─1029 ./MMDVM_Bridge /etc/MMDVM_Bridge.ini
│ ├─session-3.scope
│ │ ├─957 sshd: admin [priv]
│ │ ├─964 sshd: admin@pts/1
│ │ ├─965 -bash
│ │ ├─972 sudo ./P25Gateway /etc/P25Gateway.ini
│ │ └─973 ./P25Gateway /etc/P25Gateway.ini
│ ├─session-7.scope
│ │ ├─1055 sshd: admin [priv]
│ │ ├─1062 sshd: admin@pts/5
│ │ ├─1063 -bash
│ │ ├─1070 sudo systemctl status
│ │ ├─1071 systemctl status
│ │ └─1072 less
│ ├─session-4.scope
│ │ ├─974 sshd: admin [priv]
│ │ ├─981 sshd: admin@pts/2
│ │ ├─982 -bash
│ │ ├─989 sudo ./Analog_Bridge_DMR /etc/Analog_Bridge_DMR.ini
│ │ └─990 ./Analog_Bridge_DMR /etc/Analog_Bridge_DMR.ini
│ ├─session-1.scope
│ │ ├─912 sshd: admin [priv]
│ │ ├─944 sshd: admin@pts/0
│ │ ├─945 -bash
│ │ ├─952 sudo ./P25Reflector.sh start /etc/P25Reflector.ini
│ │ ├─953 /bin/bash ./P25Reflector.sh start /etc/P25Reflector.ini
│ │ └─955 ./P25Reflector /etc/P25Reflector.ini
│ └─session-5.scope
│ ├─ 993 sshd: admin [priv]
│ ├─1000 sshd: admin@pts/3
│ ├─1001 -bash
│ ├─1009 sudo ./Analog_Bridge_P25 /etc/Analog_Bridge_P25.ini
│ └─1010 ./Analog_Bridge_P25 /etc/Analog_Bridge_P25.ini




admin@ip-:~$ sudo systemctl status p25reflector.service
Unit p25reflector.service could not be found.
admin@ip-:~$ systemctl status p25reflector.service
Unit p25reflector.service could not be found.
admin@ip-:~$ systemctl status P25reflector.service
Unit P25reflector.service could not be found.
admin@ip:~$ systemctl enable P25reflector.service
Failed to enable unit: Access denied
admin@ip-:~$ sudo systemctl enable P25Reflector.service
Failed to enable unit: Unit file P25Reflector.service does not exist.
admin@ip-:~$ sudo systemctl enable P25Reflector
Failed to enable unit: Unit file P25Reflector.service does not exist.
admin@ip-:~$ sudo systemctl enable p25Reflector
Failed to enable unit: Unit file p25Reflector.service does not exist.

I tried different syntaxis (lower/upper P), but I can make "systemctl enable" work for "P5Reflector" services, thank you for any assistance

CynicalDebian
Posts: 263
Joined: 2023-03-02 05:26
Location: USA
Has thanked: 50 times
Been thanked: 60 times
Contact:

Re: [Software] Systemctl

#2 Post by CynicalDebian »

Your "service" is just a shell script, you will need to write a service file for it to work how you desire.

systemd.service(5)
Be seeing you...

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 706
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 129 times
Been thanked: 60 times

Re: [Software] Systemctl

#3 Post by cds60601 »

Supercalifragilisticexpialidocious

Post Reply