heh! I just noticed an article from the other day with almost the exact same title as what I just said (my eyes initially caught the last part of the title, and it startled me for a second). lol
I remember reading that post āThat Old NetBSD Server,ā¦ā (a link in the above article) which is worth the read if you get to it as well.
Notable quote:
Nine years of uptime for a server set up in a few hours, on consumer-grade hardware, and left largely unattended for years.
I now understand why Iām not ā and will never be ā rich. My first (and last) employer complained about my preference for stable and reliable solutions, equating it with lesser profits. According to him, unstable solutions requiring frequent maintenance meant more revenue. To me, a job is well-done when it works consistently, not when it demands constant fixes.
Service starts. Web UI fully functional. No internet connection.
EDIT: I bet something in slskdās code itself is the culprit. After all, local network connectivity works fine, no matter what. (Otherwise, I wouldnāt be able to login to the web UI.)
I asked on the forums at FreeBSD, and one response was something about an ENV file not being passed when the rc script runs, but is already present when running the command by itself.
What that would be I donāt know.
But at least we have confirmed internet works with the script itself.
Another reason why I think this is specific to slskd itself is that other āproperlyā ported applications, such as qBittorrent, Jellyfin, and aMule, do not need any such āENVā variable passed in their respective rc.d scripts.
Thatās cool. In regards to resources, I run the DebianVM with Portainer, with 20 containers running, using just 1GB RAM. The host Scale server has 32GB with 7GB free and thatās with this Portainer VM, another Debian VM, and a Windows VM with 5GB alotted to it. The last upgrade to Scale really improved memory management as I never had that much RAM free on this machine before. Hell may indeed freeze over!
Good luck and thanks for all the helpful posts youāve made!
That works! Incredible! Itās the only line I added to my rc script (nothing else), and it works! (I am using the default setting of vps.slsknet.org for the Soulseek Network address to confirm that it truly does work.)
Now the question is: Why?
Why does this thing need you to chdir into the root userās home directory if itās run as a service? (Whereas, if you donāt run it as a service, this isnāt necessary.)
While not mandatory, I think you should add helpful comments at the top of the script, such as informing the user to add the relevant lines to rc.conf to enable the service, as well as override the user to run it as (and to override the āappdirā if they want to specify it in a custom location).
Those nice little comments at the top of most scripts.
EDIT: This post was made because I thought a file was being copied into directories, not directories created so the code below is incorrect.
Programming question:
Why use the IF-ELSE? I mean to say since you are still running a chown on the file anyways, why not eliminate the check altogether?