File size: 1,099 Bytes
869387e abc377f b3116e8 869387e f499f55 869387e 165750d bbac4fc 869387e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
#! /bin/bash
PORT=22003
MACHINE=paffenroth-23.dyn.wpi.edu
rm -rf Wormington-Scholar
# check that the code in installed and start up the product
COMMAND="ssh -i group_key -p ${PORT} -o StrictHostKeyChecking=no student-admin@${MACHINE}"
# Add the key to the ssh-agent
eval "$(ssh-agent -s)"
ssh-add group_key
# clone the repo
git clone https://github.com/alyshacreelman/Wormington-Scholar
# Copy the files to the server
scp -P ${PORT} -o StrictHostKeyChecking=no -r Wormington-Scholar student-admin@${MACHINE}:~/
# from here on code is currently commented out in Randy's code
# check that the code in installed and start up the product
COMMAND="ssh -p ${PORT} -o StrictHostKeyChecking=no student-admin@${MACHINE}"
${COMMAND} "ls Wormington-Scholar"
${COMMAND} "sudo apt install -qq -y python3-venv"
${COMMAND} "cd Wormington-Scholar && python3 -m venv venv"
${COMMAND} "cd Wormington-Scholar && source venv/bin/activate && pip install -r requirements.txt"
${COMMAND} "nohup Wormington-Scholar/venv/bin/python3 Wormington-Scholar/app.py > log.txt 2>&1 &"
# nohup ./whatever > /dev/null 2>&1
|