Skip to content

Instantly share code, notes, and snippets.

@arundasan91
Created October 17, 2017 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arundasan91/ea24d6226e8aa70700accb3037d6dc20 to your computer and use it in GitHub Desktop.
Save arundasan91/ea24d6226e8aa70700accb3037d6dc20 to your computer and use it in GitHub Desktop.
Script to launch Jupyter notebook at boot time of VMs or Containers.
#!/bin/bash
echo '1'
export PATH=$PATH:/home/student/.local/bin/
echo '2'
su - student -c "bash -c '/home/student/.local/bin/jupyter notebook'"
echo 'Launched Jupyter Notebook'
#touch /home/student/testrclocal
sed -i "s|PasswordAuthentication no|PasswordAuthentication yes|g" /etc/ssh/sshd_config
echo '3'
export HOSTIP=`hostname -I`
export HOSTN=`hostname`
echo "$HOSTIP $HOSTN" >>/etc/hosts
restart ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment