forked from izuolan/zresume
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·23 lines (21 loc) · 761 Bytes
/
start.sh
File metadata and controls
executable file
·23 lines (21 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
RESUME_PATH="$HOME/resume"
RESUME_PORT="$1"
echo "Port: ${RESUME_PORT:="8080"}"
command -v docker >/dev/null 2>&1
if [ $? != 0 ]; then curl -sSL https://get.docker.com/ | sh; fi
mkdir -p $RESUME_PATH
docker run -d --name resume_tmp zuolan/resume
if [ ! -d "$RESUME_PATH/pages" ]; then
docker cp resume_tmp:/usr/html/user/config $RESUME_PATH/config
fi
if [ ! -d "$RESUME_PATH/pages" ]; then
docker cp resume_tmp:/usr/html/user/pages $RESUME_PATH/pages
fi
docker rm -f resume_tmp resume >/dev/null 2>&1
docker run -d --name resume -p $RESUME_PORT:80 \
-v $RESUME_PATH/pages:/usr/html/user/pages \
-v $RESUME_PATH/config/:/usr/html/user/config/ \
-v $RESUME_PATH/static/:/usr/html/static \
--restart=always zuolan/resume
echo "Done"