-
Notifications
You must be signed in to change notification settings - Fork 0
/
_launcher.sh
executable file
·27 lines (25 loc) · 972 Bytes
/
_launcher.sh
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
# WORK IN PROGRESS...
# function to run the actual program, with both config dir and zoom dir mounted
# should only run this function if you know that credentials.json
# and zoom_directory.txt already exist
run_main () {
ZOOM_DIR_PATH=`cat $HOME/.zoom-uploader/zoom_directory.txt`
docker run -v "$HOME/.zoom-uploader":"/config_dir_mount" -v $ZOOM_DIR_PATH:"/zoom_dir_mount" zoom-uploader-daemon
}
HAVE_CREDENTIALS=false
if [ -f "$HOME/.zoom-uploader/credentials.json" ]; then
HAVE_CREDENTIALS=true
fi
HAVE_ZOOM_PATH=false
if [ -f "$HOME/.zoom-uploader/zoom_directory.txt" ]; then
HAVE_ZOOM_PATH=true
fi
# if we have credentials.json and the path to the zoom videos dir, launch the
# main program
if [ $HAVE_CREDENTIALS = true ] && [ $HAVE_ZOOM_PATH = true ]; then
run_main
else
# if not, launch the config app, then, when that process has exited,
# launch the main program
docker run -v "$HOME" -p 3000:3000 zoom-config-app && run_main
fi