oleost
October 11, 2013, 4:57pm
1
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.
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.
f00b4r
October 11, 2013, 7:27pm
2
What error did you get and what shell are you using to try and launch it?
Sent from my iPad using Tapatalk - now Free
oleost
October 11, 2013, 7:35pm
3
root@Plex:/PlexConnect-master # ls
.gitignore Localize.py Settings.cfg
ATVSettings.cfg Localize.pyc Settings.py
ATVSettings.py PlexAPI.py Settings.pyc
ATVSettings.pyc PlexAPI.pyc WebServer.py
DNSServer.py PlexConnect.log WebServer.pyc
DNSServer.pyc PlexConnect.py XMLConverter.py
Debug.py PlexConnect_daemon.bash XMLConverter.pyc
Debug.pyc PlexConnect_daemon.py assets
License.txt README.md
root@Plex:/PlexConnect-master # ./PlexConnect_daemon.bash start
./PlexConnect_daemon.bash: Command not found.
root@Plex:/PlexConnect-master #
Guess its the default Freebsd shell?
Hmm, Im not used to FreeBSD, looks like I got it working afterall.
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 #
f00b4r
October 11, 2013, 7:52pm
4
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
oleost
October 12, 2013, 9:57am
6
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?
If anyone still interested here is FreeBSD daemon (/usr/local/etc/rc.d/plexConnect_daemon):
#! /bin/sh
#
#
# PROVIDE: plexConnect_daemon
# REQUIRE: DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
name="plexconnect"
rcvar=`set_rcvar`
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"
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 ?
btw where do you put that code?
nvm!
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
Common starting point maybe 'universal' installer which will puts right script into right place... But in most cases documentation is enough
f00b4r
January 25, 2014, 10:12am
12
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.
system
Closed
December 21, 2019, 12:14am
13
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.