Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed custom mount path by adding -m argument #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions docker/ocstart-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SSH="/sbin/my_init --enable-insecure-key"
# change permission of key otherwise it wouldn't be used
chmod 600 configs/insecure_key

while getopts "o:s:d:p:i:h" opt; do
while getopts "o:s:d:p:m:i:h" opt; do
case $opt in
o)
([ $OPTARG == ubuntu ] || [ $OPTARG == centos ]) && OS=$OPTARG
Expand All @@ -26,10 +26,16 @@ while getopts "o:s:d:p:i:h" opt; do
p)
PORT=$OPTARG
;;
d)
if [ -d $OPTARG ]; then
VOLUME_DIR=$OPTARG
m)
if [[ $OPTARG != /* ]]; then
echo "Mount path must be absolute"
exit 1
fi
if [ ! -d $OPTARG ]; then
echo "Mount directory does not exist"
exit 1
fi
VOLUME_DIR=$OPTARG
;;
i)
[ "$OPTARG" -ge 1 -a "$OPTARG" -le 32 ] && SERVER_INSTANCES=$OPTARG
Expand All @@ -44,7 +50,7 @@ while getopts "o:s:d:p:i:h" opt; do
echo " -s apache, nginx default: apache"
echo " -d sqlite, mysql default: sqlite"
echo " -p <Port> default: 8888"
echo " -d <Dir> to mount in docker default: /data-vol"
echo " -m <Dir> to mount in docker default: /data-vol"
echo " -i <Number> of server instances default: 3"
echo " -h This help screen"
echo
Expand Down