How to autostart Sage Notebook at boot time?

57 views
Skip to first unread message

Sourjya Sankar Sen

unread,
Jan 15, 2015, 9:49:50 AM1/15/15
to sage-n...@googlegroups.com
Hello,
I'm using Sage NB on CentOS 7 and would like to know how I can get it to auto-start at boot-time. Are there any ready made rc.d scripts that I can use?

Thank you,
Sourjya

Pedro Cruz

unread,
Jan 15, 2015, 1:20:13 PM1/15/15
to sage-n...@googlegroups.com
In ubuntu 12.04 and SageNB we have a startup script below. 
Pedro

$ cat /etc/rc.local 

#!/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.

#for the virtual machine disk
echo 120 > /sys/block/sda/device/timeout

#starting sageserver
su sageserver  /home/sageserver/startnotebook >> /home/sageserver/startnotebook.rclocal.log  2>&1  &
exit 0

AND

$ cat  /home/sageserver/startnotebook

#!/bin/sh

/home/sageserver/sage-5.2/sage -c "notebook(interface='localhost', directory='/home/sageserver/sage_notebook.sagenb',port=8000, accounts=False, timeout=900, server_pool=['sage%d@localhost'%i for i in range(1)], ulimit='-u 100 -t 36000 -v 500000')" 


(eof)
Reply all
Reply to author
Forward
0 new messages