Score:1

rc-local.service: Failed with result 'exit-code'

ad flag

I want to active UDPGW port for calling and gaming in my VPS server, I did this commands for my previous two VPS and it worked fine.

sudo wget -O /usr/bin/badvpn-udpgw "https://raw.githubusercontent.com/daybreakersx/premscript/master/badvpn-udpgw64"
sudo touch /etc/rc.local
sudo nano /etc/rc.local

----------------------
#!/bin/sh -e
screen -AmdS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300
exit 0
----------------------

chmod +x /etc/rc.local
sudo systemctl status rc-local.service
sudo chmod +x /usr/bin/badvpn-udpgw
sudo screen -AmdS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300
reboot
sudo lsof -i -P -n | grep LISTEN

but now in my third VPS say this :

systemd[1]: Starting /etc/rc.local Compatibility...
rc.local[458]: /etc/rc.local: 2: screen: not found
systemd[1]: rc-local.service: Control process exited, code=exited, status=127/n/a
systemd[1]: rc-local.service: Failed with result 'exit-code'.
systemd[1]: Failed to start /etc/rc.local Compatibility.

What's problem and how I can fix this? I'm using Ubuntu 20.04

Update: When I'm use sudo systemctl status rc-local.service show this :


* rc-local.service - /etc/rc.local Compatibility
     Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled)
    Drop-In: /usr/lib/systemd/system/rc-local.service.d
             `-debian.conf
     Active: failed (Result: exit-code) since Sat 2023-05-27 10:40:31 EEST; 5 days ago
       Docs: man:systemd-rc-local-generator(8)
hr flag
Is the `screen` program actually installed on your system?
MorinKite avatar
ad flag
yes , I'm used apt install screen and installed well
hr flag
So do you get a different result if you use the full path `/usr/bin/screen` in the rc.local file?
MorinKite avatar
ad flag
no , I did it but again say this
hr flag
Please [edit] your question with any new information - it's hard to read in comments
MorinKite avatar
ad flag
ok wait this is my first time I'm ask a question in stack :)
nobody avatar
gh flag
What is in your dropin file? I mean under /usr/lib/systemd/system/rc¬local. service. d/
MorinKite avatar
ad flag
Is Empty actually
nobody avatar
gh flag
Then remove it.
MorinKite avatar
ad flag
How should I remove?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.