SOLVED Trouble setting up rc.conf

Discolai

Cadet
Joined
Jan 24, 2019
Messages
5
Hi, I am having some trouble setting up rc.conf to run my ts3 server script. I placed the script in /usr/local/etc/rc.d and I am able to start the script with service ts3server onsestart, so the script runs fine by itself.
I have set teamspeak_enable="YES" in /etc/rc.conf, but when I run service ts3server rcvar I get this output:
Code:
#ts3server
#
teamspeak_enable=""
#    (default: "")
 

Attachments

  • ts3server_service.zip
    384 bytes · Views: 338

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
in your rc.conf file, try this:

Code:
ts3server_enable="YES"
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Are you doing this in a jail?

If you are editing the rc.conf of the FreeNAS host you won't get a lot of joy as it is re-written based on the config database.

It is generally a terrible idea to run applications directly on a FreeNAS host... always use jails.

If you're already in a jail it may me useful to go to a command prompt in the jail and run sysrc -a to see what's actually being seen there.
 

Discolai

Cadet
Joined
Jan 24, 2019
Messages
5
Are you doing this in a jail?

If you are editing the rc.conf of the FreeNAS host you won't get a lot of joy as it is re-written based on the config database.

It is generally a terrible idea to run applications directly on a FreeNAS host... always use jails.

If you're already in a jail it may me useful to go to a command prompt in the jail and run sysrc -a to see what's actually being seen there.
Yes, I forgot to mention that it is running inside a jail. I ran the sysrc -a command which showed that it could see the rcvar, this made me think that there was something wrong with my script. I followed this guide when I created the script, but I had forgotten load_rc_config. I added the command and then it was able to read the rcvar properly.
 
Top