Fix server paths
This commit is contained in:
parent
d969d168e1
commit
9de9ccefd4
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
########### PATHS ######################################################################
|
########### PATHS ######################################################################
|
||||||
|
|
||||||
WORK_DIR="/Users/imac/Projects/CapCollectorData"
|
WORK_DIR="~/Projects/CapCollectorServer/Training"
|
||||||
BACKUP_DIR="${WORK_DIR}/backup"
|
BACKUP_DIR="${WORK_DIR}/backup"
|
||||||
IMAGE_DIR="${WORK_DIR}/images"
|
IMAGE_DIR="${WORK_DIR}/images"
|
||||||
VERSION_FILE="${WORK_DIR}/classifier.version"
|
VERSION_FILE="${WORK_DIR}/classifier.version"
|
||||||
@ -41,6 +41,7 @@ SERVER_ROOT_PATH="/data/public/capserver"
|
|||||||
########################################################################################
|
########################################################################################
|
||||||
|
|
||||||
echo "[INFO] Working in directory ${WORK_DIR}"
|
echo "[INFO] Working in directory ${WORK_DIR}"
|
||||||
|
cd ${WORK_DIR}
|
||||||
|
|
||||||
echo "[INFO] Getting classifier version from server..."
|
echo "[INFO] Getting classifier version from server..."
|
||||||
scp -P $SSH_PORT ${SERVER}:/${SERVER_ROOT_PATH}/classifier.version $WORK_DIR
|
scp -P $SSH_PORT ${SERVER}:/${SERVER_ROOT_PATH}/classifier.version $WORK_DIR
|
||||||
@ -96,7 +97,7 @@ if [ $retVal -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[INFO] Moving files into public directory..."
|
echo "[INFO] Moving files into public directory..."
|
||||||
ssh -p ${SSH_PORT} ${SERVER} "sudo mv /home/pi/classifier.* ${SERVER_ROOT_PATH}/"
|
ssh -p ${SSH_PORT} ${SERVER} "sudo mv /home/pi/classifier.* ${SERVER_ROOT_PATH}"
|
||||||
|
|
||||||
retVal=$?
|
retVal=$?
|
||||||
if [ $retVal -ne 0 ]; then
|
if [ $retVal -ne 0 ]; then
|
||||||
@ -105,7 +106,7 @@ if [ $retVal -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[INFO] Updating permissions..."
|
echo "[INFO] Updating permissions..."
|
||||||
ssh -p ${SSH_PORT} ${SERVER} "sudo chown -R www-data\:www-data ${SERVER_ROOT_PATH}/"
|
ssh -p ${SSH_PORT} ${SERVER} "sudo chown -R www-data\:www-data ${SERVER_ROOT_PATH}"
|
||||||
|
|
||||||
retVal=$?
|
retVal=$?
|
||||||
if [ $retVal -ne 0 ]; then
|
if [ $retVal -ne 0 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user