Why would a command work when run by itself, but not be able to resolve hostname "vps.slsknet.org" when run using an rc script?
I have installed soulseek following these instructions from github (needs allow.mlock=1) inside a jail, and the program works when invoked with
It can connect to the servers needed for downloading and such.
But if I try to run it using a service script, it always fails with "Failed to resolve hostname "vps.slsknet.org"
Literall everything else about the program works. WebUI, login, etc... but it cannot connect to the server.
Why?
Here is the service script
I have also tried running the script without the daemon part, but no go.
I have also tried running it as "www" and "root" users with no luck.
It just cannot resolve the hostname.
Any ideas?
I have installed soulseek following these instructions from github (needs allow.mlock=1) inside a jail, and the program works when invoked with
su soulseek -c "/opt/slskd/slskd --app-dir=/home/soulseek/.local/share/slskd"It can connect to the servers needed for downloading and such.
But if I try to run it using a service script, it always fails with "Failed to resolve hostname "vps.slsknet.org"
Literall everything else about the program works. WebUI, login, etc... but it cannot connect to the server.
Why?
Here is the service script
Code:
#!/bin/sh
# PROVIDE: slskd
# REQUIRE: NETWORKING
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable slskd at startup
# slskd_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable slskd
# slskd_user (str): Set to user running slskd
# (default 'soulseek')
. /etc/rc.subr
name="slskd"
rcvar=slskd_enable
load_rc_config $name
: ${slskd_enable="NO"}
: ${slskd_user:="soulseek"}
: ${slskd_config:="/home/${slskd_user}/.local/share/slskd"}
pidfile="${slskd_config}/slskd.pid"
procname="/opt/slskd/slskd"
required_files="${slskd_config}/slskd.yml"
command="/usr/sbin/daemon"
command_args="-f -p ${pidfile} ${procname} --app-dir=${slskd_config}"
run_rc_command "$1"
I have also tried running the script without the daemon part, but no go.
I have also tried running it as "www" and "root" users with no luck.
It just cannot resolve the hostname.
Any ideas?