# Feature Request: Daemon for FreeBSD

**URL:** <https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428>\
**Category:** Apps & Creations\
**Created:** [October 11, 2013, 4:57pm UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428 "2013-10-11T16:57:51Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![oleost](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/oleost/32/135552_2.png) [@oleost](https://forums.plex.tv/u/oleost)\
**Post date:** [October 11, 2013, 4:57pm UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/1 "2013-10-11T16:57:51Z")

</div>

Hello. Seeing in the new changelog there is a daemon for Linux and Mac OS, tried to see if it worked on my Nas4free(FreeBSD) box but it didnt work.

&nbsp;

Would it be possible to have one for FreeBSD aswell? Think there a couple of us out there with either Freenas or Nas4free NAS running PMS and Plexconnect.

---

<div class="post-metadata">

**Author:** ![f00b4r](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/f00b4r/32/768_2.png) [@f00b4r](https://forums.plex.tv/u/f00b4r)\
**Post date:** [October 11, 2013, 7:27pm UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/2 "2013-10-11T19:27:34Z")

</div>

What error did you get and what shell are you using to try and launch it?  
  
  
  
  
  
Sent from my iPad using Tapatalk - [now Free](http://tapatalk.com/m?id=1)

---

<div class="post-metadata">

**Author:** ![oleost](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/oleost/32/135552_2.png) [@oleost](https://forums.plex.tv/u/oleost)\
**Post date:** [October 11, 2013, 7:35pm UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/3 "2013-10-11T19:35:25Z")

</div>

> root@Plex:/PlexConnect-master # ls
> 
> .gitignore &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Localize.py &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Settings.cfg
> 
> ATVSettings.cfg &nbsp; &nbsp; &nbsp; &nbsp; Localize.pyc &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Settings.py
> 
> ATVSettings.py &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PlexAPI.py &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Settings.pyc
> 
> ATVSettings.pyc &nbsp; &nbsp; &nbsp; &nbsp; PlexAPI.pyc &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WebServer.py
> 
> DNSServer.py &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PlexConnect.log &nbsp; &nbsp; &nbsp; &nbsp; WebServer.pyc
> 
> DNSServer.pyc &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PlexConnect.py &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XMLConverter.py
> 
> Debug.py &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PlexConnect\_daemon.bash XMLConverter.pyc
> 
> Debug.pyc &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PlexConnect\_daemon.py &nbsp; assets
> 
> License.txt &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; README.md
> 
> root@Plex:/PlexConnect-master # ./PlexConnect\_daemon.bash start
> 
> ./PlexConnect\_daemon.bash: Command not found.
> 
> root@Plex:/PlexConnect-master #

&nbsp;

Guess its the default Freebsd shell?

&nbsp;

Hmm, Im not used to FreeBSD, looks like I got it working afterall.

&nbsp;

> root@Plex:/PlexConnect-master # /bin/sh ./PlexConnect\_daemon.bash start
> 
> Starting PlexConnect ...
> 
> root@Plex:/PlexConnect-master # /bin/sh ./PlexConnect\_daemon.bash status
> 
> PlexConnect is running
> 
> root@Plex:/PlexConnect-master #
> 
> &nbsp;

---

<div class="post-metadata">

**Author:** ![f00b4r](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/f00b4r/32/768_2.png) [@f00b4r](https://forums.plex.tv/u/f00b4r)\
**Post date:** [October 11, 2013, 7:52pm UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/4 "2013-10-11T19:52:01Z")

</div>

🙂  
  
  
For anyone else using FreeBSD itself you may want to read this about the default shell if you have issues:  
  
  
[http://www.freebsd.org/doc/en/articles/linux-users/shells.html](http://www.freebsd.org/doc/en/articles/linux-users/shells.html)

---

<div class="post-metadata">

**Author:** ![mblack42](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mblack42](https://forums.plex.tv/u/mblack42)\
**Post date:** [October 12, 2013, 4:44am UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/5 "2013-10-12T04:44:45Z")

</div>

just use [daemontools](http://cr.yp.to/daemontools.html)

---

<div class="post-metadata">

**Author:** ![oleost](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/oleost/32/135552_2.png) [@oleost](https://forums.plex.tv/u/oleost)\
**Post date:** [October 12, 2013, 9:57am UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/6 "2013-10-12T09:57:36Z")

</div>

> just use [daemontools](http://cr.yp.to/daemontools.html)

Have you succesfully used daemontools ? I manage to install it using pkg\_add, but trying to read up on how to use it and Im stuck. could you write alittle guide?

---

<div class="post-metadata">

**Author:** ![Alexeytr](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@Alexeytr](https://forums.plex.tv/u/Alexeytr)\
**Post date:** [January 25, 2014, 5:30am UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/7 "2014-01-25T05:30:40Z")

</div>

If anyone still interested here is FreeBSD daemon (/usr/local/etc/rc.d/plexConnect\_daemon):

&nbsp;

#! /bin/sh

#

#

# PROVIDE: plexConnect\_daemon

# REQUIRE: DAEMON

# KEYWORD: shutdown

. /etc/rc.subr

name="plexconnect"

rcvar=`set_rcvar`

&nbsp;

command="/usr/local/bin/python"

pidfile="/var/run/${name}.pid"

plexconnect\_flags="/usr/local/plexconnect/PlexConnect/PlexConnect\_daemon.py --pidfile $pidfile"

eval ${name}\_flags=\"${plexconnect\_flags}\"

load\_rc\_config $name

run\_rc\_command "$1"

---

<div class="post-metadata">

**Author:** ![superjunaid](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/superjunaid/32/121549_2.png) [@superjunaid](https://forums.plex.tv/u/superjunaid)\
**Post date:** [January 25, 2014, 5:34am UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/8 "2014-01-25T05:34:48Z")

</div>

This is just what I was looking for!! Will give it a try right away... btw have you tested this one FreeNAS 9.2.0 ?

---

<div class="post-metadata">

**Author:** ![superjunaid](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/superjunaid/32/121549_2.png) [@superjunaid](https://forums.plex.tv/u/superjunaid)\
**Post date:** [January 25, 2014, 5:43am UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/9 "2014-01-25T05:43:02Z")

</div>

btw where do you put that code?

nvm!

---

<div class="post-metadata">

**Author:** ![dlmarston](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@dlmarston](https://forums.plex.tv/u/dlmarston)\
**Post date:** [January 25, 2014, 6:54am UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/10 "2014-01-25T06:54:26Z")

</div>

i think this goes back to an earlier conversation about if we should have an OS detection command built into the startup script.

evem if we kept each OS specific command set in their own separate script, a common starting point might ease the way.

dave

---

<div class="post-metadata">

**Author:** ![Alexeytr](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@Alexeytr](https://forums.plex.tv/u/Alexeytr)\
**Post date:** [January 25, 2014, 7:43am UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/11 "2014-01-25T07:43:54Z")

</div>

Common starting point maybe 'universal' installer which will puts right script into right place... But in most cases documentation is enough&nbsp;

---

<div class="post-metadata">

**Author:** ![f00b4r](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/f00b4r/32/768_2.png) [@f00b4r](https://forums.plex.tv/u/f00b4r)\
**Post date:** [January 25, 2014, 10:12am UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/12 "2014-01-25T10:12:20Z")

</div>

There are now OS specific folders in /support for this kind of thing to run OS specific stuff if you want to create a pull request for FreeBSD 😉  
  
Just make sure you test it on a vanilla system first.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 21, 2019, 12:14am UTC](https://forums.plex.tv/t/feature-request-daemon-for-freebsd/44428/13 "2019-12-21T00:14:50Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
