|
SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Launch Sage at boot
I run Sage on Ubuntu 9.04 and, to launch Sage at boot, I think I should simply edit the /etc/rc.local file so that it looks like below. This, however, does not start Sage. I have to manually start Sage by going to the terminal and typing sudo /opt/sagetv/server/./startsage. I've tried some variations of this added to rc.local but no luck. Can anyone help?
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. /opt/sagetv/server/startsage exit 0 |
#2
|
|||
|
|||
Don't mess with rc.local. The easiest way to start sage automatically is with a script in /etc/init.d. I think the package install puts it there by default. Look and see if there is a file called /etc/init.d/sagetv. If it is there, then look for links to /etc/init.d/sagetv in the directories /etc/rc[2345].d. The links will be called something like S20sagetv. If all those are there, sagetv should start automatically at boot time. If the init.d file is there, but the links are not, put them there with the command 'sudo update-rc.d sagetv defaults 98'.
|
#3
|
|||
|
|||
I already have /etc/init.d/sagetv and I already have S98sagetv in each of the /etc/rc[2345].d directories. The date stamps on them match the original install date. I'm not sure what to check next.
|
#4
|
|||
|
|||
Is /etc/init.d/sagetv executable? What is the result of:
ls -la /etc/init.d/sagetv Check the run level with: who -r Is the run control link set up correctly? Assuming you run at run level 2, what is the result of: ls -la /etc/rc2.d/S98sagetv
__________________
SageTV Server v9.2.2, Ubuntu Server 18.04.4 x64, Java 1.8.0_252, Xeon E5-2690, 32GB, 6X6TB WD Red - Software Raid 6, 2X HDHR3 (OTA), 3X HD-200 |
#5
|
|||
|
|||
It appears to be executable... ls -la /etc/init.d/sagetv results in...
-rwxr-xr-x 1 root root 242 2009-08-08 00:11 /etc/init.d/sagetv who -r shows run level 2 and ls -la /etc/rc2.d/S98sagetv results in... lrwxrwxrwx 1 root root 16 2009-08-08 00:16 /etc/rc2.d/S98sagetv -> ../init.d/sagetv Appreciate the help. Open to suggestions. |
#6
|
|||
|
|||
Yes it does look like it should work.
reboot and check if sagetv is running: ps -ef|grep sagetv If not running what happens when try to execute manually? sudo /etc/init.d/sagetv start
__________________
SageTV Server v9.2.2, Ubuntu Server 18.04.4 x64, Java 1.8.0_252, Xeon E5-2690, 32GB, 6X6TB WD Red - Software Raid 6, 2X HDHR3 (OTA), 3X HD-200 Last edited by RocKKer; 02-25-2010 at 12:39 AM. |
#7
|
|||
|
|||
After reboot I have the following...
user@ubuntu:~$ ps -ef|grep sagetv user 5316 5185 0 00:45 pts/0 00:00:00 grep sagetv user@ubuntu:~$ user@ubuntu:~$ sudo /etc/init.d/sagetv start [sudo] password for user: Starting SageTV server Changing to SageTV directory /opt/sagetv/server Executing pre-scripts Starting server mode user@ubuntu:~$ ps -ef|grep sagetv root 7151 1 72 00:46 pts/0 00:00:14 java -Dsage.paths.tools=/opt/sagetv/server -DUSERKEY=XXXXXXXXXXXXXXXXXX -Xmx256m -XX:+UseAdaptiveSizePolicy -XX:MaxGCPauseMillis=25 -XX:GCTimeRatio=24 -cp Sage.jar:.:/:JARs/commons-httpclient-2.0.2.jar:JARs/commons-jxpath-1.1.jar:JARs/commons-logging-api.jar:JARs/commons-logging.jar:JARs/df_sageutils.jar:JARs/jcifs-1.1.6.jar:JARs/lib_odi.jar:JARs/mx4j-impl.jar:JARs/mx4j-jmx.jar:JARs/mx4j-remote.jar:JARs/mx4j-tools.jar:JARs/nielm_sagemenureader.jar:JARs/nielm_sageutls.jar:JARs/sbbi-jmx-1.0.jar:JARs/sbbi-upnplib-1.0.3.jar:JARs/stusals_gif_anim_parser.jar:JARs/stusals_wrs.jar:JARs/xml-apis.jar SecuredLoader 0 0 x sagetv Sage.properties user 7653 5185 0 00:46 pts/0 00:00:00 grep sagetv What do you show on your system for output of ps -ef|grep sagetv? Last edited by ecojam; 02-25-2010 at 01:02 AM. |
#8
|
|||
|
|||
Here's mine. I seem to have a few plugins that you don't have but otherwise looks the similar. Does Sage GUI work for you?
Code:
root@media:/opt/sagetv/server# ps -ef|grep sagetv root 11300 10437 0 22:51 pts/1 00:00:00 grep sagetv root 30388 1 3 Feb22 pts/0 01:41:05 java -Dsage.paths.tools=/opt/sagetv/server -Djava.awt.headless=true -DUSERKEY=XXXXXXXXXXXXXXXXXXXXXXXX -Xmx1024m -XX:+UseAdaptiveSizePolicy -XX:MaxGCPauseMillis=25 -XX:GCTimeRatio=24 -cp Sage.jar:.:/:JARs/activation.jar:JARs/ant-1.6.5.jar:JARs/commons-codec-1.3.jar:JARs/commons-io-1.4.jar:JARs/commons-jxpath-1.1.jar:JARs/commons-lang-2.4.jar:JARs/commons-logging-api.jar:JARs/commons-logging.jar:JARs/commons-vfs-20070823.jar:JARs/core-3.1.1.jar:JARs/df_sageutils.jar:JARs/gkusnick.sagetv.jar:JARs/htmlparser.jar:JARs/imageutils.jar:JARs/jcifs-1.1.6.jar:JARs/jetty-6.1.19.jar:JARs/jetty-ajp-6.1.19.jar:JARs/jetty-rewrite-handler-6.1.19.jar:JARs/jetty-sslengine-6.1.19.jar:JARs/jetty-starter.jar:JARs/jetty-util-6.1.19.jar:JARs/jsp-2.1.jar:JARs/jsp-2.1-jetty-6.1.19.jar:JARs/jsp-api-2.1.jar:JARs/log4j-1.2.15.jar:JARs/log4j.jar:JARs/lucene-core-2.3.2.jar:JARs/mailcheck.jar:JARs/mail.jar:JARs/metadata-updater.jar:JARs/mina-core-1.1.7.jar:JARs/mx4j-impl.jar:JARs/mx4j-jmx.jar:JARs/mx4j-remote.jar:JARs/mx4j-tools.jar:JARs/nielm_getrssnews.jar:JARs/nielm_sageimdb.jar:JARs/nielm_sagemenureader.jar:JARs/nielm_sageutls.jar:JARs/phoenix.jar:JARs/sagemc.jar:JARs/sagex.api.jar:JARs/sbbi-jmx-1.0.jar:JARs/sbbi-upnplib-1.0.3.jar:JARs/servlet-api-2.5-6.1.19.jar:JARs/shadeBlue-SageInfoPopup-1.0.6.jar:JARs/slf4j-api-1.5.5.jar SecuredLoader 0 0 x sagetv Sage.properties One final test would be to stop sagetv /etc/init.d/sagetv stop Then try to use the rc script link to start: /etc/rc2.d/S98sagetv start This will mimic run control startup of sagetv.
__________________
SageTV Server v9.2.2, Ubuntu Server 18.04.4 x64, Java 1.8.0_252, Xeon E5-2690, 32GB, 6X6TB WD Red - Software Raid 6, 2X HDHR3 (OTA), 3X HD-200 Last edited by RocKKer; 02-25-2010 at 01:09 AM. |
#9
|
|||
|
|||
Good point on DUSERKEY.
Sage GUI on the local server works fine. I haven't tried remotely though. I've been considering increasing the memory allocation similar to yours at Xmx1024m. Sage is fairly responsive, but as I load more into the Videos folder it gets a bit slower on the load times. Of course, that could be just an issue with my local home network. I'm still baffled on why Sage won't launch at boot though. It's getting late here, so it's sleep time for me. Thank you for help thus far. |
#10
|
|||
|
|||
edited my post above to try a one more thing. When you get a chance give it a try.
__________________
SageTV Server v9.2.2, Ubuntu Server 18.04.4 x64, Java 1.8.0_252, Xeon E5-2690, 32GB, 6X6TB WD Red - Software Raid 6, 2X HDHR3 (OTA), 3X HD-200 |
#11
|
|||
|
|||
You also might try adding the line:
logger "Running my script `date`" In the beginning of the sagetv script (/etc/init.d/sagetv) and a similar logger command at its end. Reboot and check /var/log/syslog to see if the script is getting run.
__________________
SageTV Server v9.2.2, Ubuntu Server 18.04.4 x64, Java 1.8.0_252, Xeon E5-2690, 32GB, 6X6TB WD Red - Software Raid 6, 2X HDHR3 (OTA), 3X HD-200 |
#12
|
|||
|
|||
I have 4 syslog events that look similar to this...
Feb 25 23:03:00 ubuntu logger: Running my script Thu Feb 25 23:03:00 CST 2010 Does this mean that it is executing at boot? What would cause it to not launch? My output for ps -ef|grep sagetv is... user 16563 16454 0 23:14 pts/0 00:00:00 grep sagetv |
#13
|
|||
|
|||
Yes it does seem to be executing the script.
I would check the sagetv logs. /opt/sagetv/server/sagetv_0.txt That should be the newest log. See if there is anything that stands out. Did u follow a guide to set it up? Here is the guide I used. I remember one thing I had a problem with at one time was sagetv starting before the network did, I'm trying to remember now, but I think sagetv did not start if it had no network. I'll dig around to find out when the networking script is executed, it doesn't seem to have link in rc2.d. I came across another thread about not starting, wonder if this thread may help.
__________________
SageTV Server v9.2.2, Ubuntu Server 18.04.4 x64, Java 1.8.0_252, Xeon E5-2690, 32GB, 6X6TB WD Red - Software Raid 6, 2X HDHR3 (OTA), 3X HD-200 Last edited by RocKKer; 02-26-2010 at 12:41 AM. |
#14
|
|||
|
|||
I review the sagetv_0.txt logs pretty regularly, but nothing is there until I manually start Sage. And with Sage at S98, I doubt networking is the problem. I think network is at S35. My guess is that it is launching at boot as it should and then something is shutting it down later. Anyone have any thoughts on where or what that could be?
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Launch another program via sage menu | ANT | SageTV Studio | 2 | 06-30-2007 06:31 AM |
Launch Sage Client from SageTV? And another question. | silkshadow | SageTV Software | 6 | 09-12-2005 01:16 PM |
Sage now crashing on launch (XP-SP2 issue?) | Bear | SageTV Software | 5 | 07-02-2005 07:21 AM |
Sage won;t launch, java error, help! | robisc | SageTV Software | 4 | 09-07-2004 04:48 PM |
Help, Sage starts recording immediately after launch | SteveP | SageTV Software | 3 | 08-27-2004 03:50 PM |