Comments (4)
Hi @DeviantEng
I haven't tested on Centos 7 but I do have it running like you are asking on my Centos 6.6 box at home. Here the cache and log folders are placed in my specified path.
I've hardly worked at all with systemd so unfortunately cannot give much insight there, but below are examples of my init script and config for reference, might help out.
Here is an example of my config (/etc/sysconfig/plexpy):
# PlexPy service configuration
#run PlexPy as
PP_USER=myuser
PP_HOME=/home/myuser/.python_apps/plexpy
PP_PIDFILE=/var/run/plexpy/plexpy.pid
PP_DATA=/home/myuser/.python_apps/AppData/plexpy
PP_CONFIG=/home/myuser/.python_apps/AppData/plexpy/config.ini
PYTHON_BIN=/usr/local/bin/python2.7
#gui address, eg: ${protocol}://${host}:${port}/plexpy/
protocol=http
host=0.0.0.0
port=8181
#leave blank if no username/password is required to access the gui
username=
password=
#use nice, ionice, taskset to start PlexPy
nicecmd=
# example: nicecmd="nice -n 19 ionice -c3"
And here is my init script (/etc/init.d/plexpy):
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: plexpy
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts PlexPy
# Description: starts PlexPy
### END INIT INFO
# Source function library.
. /etc/init.d/functions
# Source PlexPy configuration
if [ -f /etc/sysconfig/plexpy ]; then
. /etc/sysconfig/plexpy
fi
prog=plexpy
lockfile=/var/lock/subsys/$prog
## Edit user configuation in /etc/sysconfig/plexpy to change
## the defaults
username=${PP_USER-plexpy}
homedir=${PP_HOME-/opt/plexpy}
datadir=${PP_DATA-/opt/plexpy}
configfile=${PP_CONFIG-/opt/plexpy}
pidfile=${PP_PIDFILE-/var/run/plexpy/plexpy.pid}
nice=${PP_NICE-}
python_bin=${PYTHON_BIN-/usr/local/python}
##
pidpath=`dirname ${pidfile}`
options=" --daemon --quiet --nolaunch --config ${configfile} --pidfile ${pidfile} --datadir ${datadir}"
# create PID directory if not exist and ensure the PlexPy user can write to it
if [ ! -d $pidpath ]; then
mkdir -p $pidpath
chown $username $pidpath
fi
if [ ! -d $datadir ]; then
mkdir -p $datadir
chown $username $datadir
fi
start() {
# Start daemon.
echo -n $"Starting $prog: "
daemon --user=${username} --pidfile=${pidfile} ${nice} ${python_bin} ${homedir}/PlexPy.py ${options}
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $lockfile
return $RETVAL
}
stop() {
echo -n $"Shutting down $prog: "
killproc -p ${pidfile} ${python_bin}
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $lockfile
return $RETVAL
}
rh_status() {
# run checks to determine if the service is running or use generic status
/usr/bin/nc -z $host $port &> /dev/null
retval=$?
if [ $retval -eq 0 ];then
pid=`ps -fu ${username} | grep -v grep | grep PlexPy.py | awk '{print $2}'`
echo "$prog (pid $pid) is running..."
return $retval
else
echo "$prog is stopped"
return $retval
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
# status $prog
rh_status
;;
restart|force-reload)
stop
start
;;
try-restart|condrestart)
if status $prog > /dev/null; then
stop
start
fi
;;
reload)
exit 3
;;
*)
echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
exit 2
esac
Here is my directory listing to show the folder locations:
[root@home home]# ls -alrt -d -1 /home/myuser/.python_apps/AppData/plexpy/{*,.*}
drwxr-xr-x 6 myuser myuser 4096 Jul 30 12:49 /home/myuser/.python_apps/AppData/plexpy/..
drwxr-xr-x 2 myuser myuser 4096 Jul 30 12:49 /home/myuser/.python_apps/AppData/plexpy/logs
drwxr-xr-x 2 myuser myuser 4096 Jul 30 12:49 /home/myuser/.python_apps/AppData/plexpy/cache
-rw-r--r-- 1 myuser myuser 40 Aug 5 19:12 /home/myuser/.python_apps/AppData/plexpy/version.lock
-rw-r--r-- 1 myuser myuser 4108 Aug 6 07:12 /home/myuser/.python_apps/AppData/plexpy/config.ini
-rw-r--r-- 1 myuser myuser 4519936 Aug 6 07:12 /home/myuser/.python_apps/AppData/plexpy/plexpy.db
drwxr-xr-x 4 myuser myuser 4096 Aug 6 16:12 /home/myuser/.python_apps/AppData/plexpy/.
from tautulli.
Very interesting. Not sure what my issue is then, but I just re-installed in /opt and it's working fine.
So another question, is there a way that I can get the History list outputed to a text file?
from tautulli.
There isn't currently a way to do that.
from tautulli.
I'm closing this as your issue has been resolved.
from tautulli.
Related Issues (20)
- Installer parameter to prevent automatic start after installation/update
- Label IP addresses
- Woke up to segmentation fault HOT 4
- Since of 2 days im getting this error: HOT 4
- Add DOVI to stream details from Plex HOT 3
- ListenBrainz submission support HOT 1
- Docker Compose - ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory HOT 2
- Show client Plex App Version on Tautulli dashboard HOT 8
- Add "product_version" & "platform_version" in Notification Parameters HOT 1
- [Feature Request] Possiblity to merge users. HOT 2
- My users list is not showing Properly HOT 1
- Add the ability to run any file as a notification agent HOT 1
- Email notification working, but only being sent to one of the recipients? HOT 1
- Hope that Chinese language can be added HOT 1
- Notification email `plex_id` parameter renders blank HOT 1
- Meta: #2268 closed as support request but is actually a bug HOT 2
- Can't access Tautulli web server HOT 1
- Current remote stream count HOT 1
- API doesn't include CORS headers in response to GET method request
- Useage on March 8th very wrong HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tautulli.