Skip to content

Instantly share code, notes, and snippets.

@hidinginabunker
Created September 8, 2018 03:05
Show Gist options
  • Save hidinginabunker/5082aa1f1a1147c5d957d3b9f2648210 to your computer and use it in GitHub Desktop.
Save hidinginabunker/5082aa1f1a1147c5d957d3b9f2648210 to your computer and use it in GitHub Desktop.
Starts a jupyter notebook on boot in an anaconda environment
#!/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.
exec 1>/tmp/rc.local.log 2>&1 # send stdout and stderr from rc.local to a log file
set -x # tell sh to display commands before execution
su gherrera -c "/home/gherrera/anaconda2/envs/fastai/bin/jupyter notebook --config=/home/gherrera/.jupyter/jupyter_notebook_config.py --no-browser --notebook-dir=/home/gherrera" &
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment