Created
October 17, 2017 00:53
-
-
Save arundasan91/ea24d6226e8aa70700accb3037d6dc20 to your computer and use it in GitHub Desktop.
Script to launch Jupyter notebook at boot time of VMs or Containers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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