ykxVK8yL5L commited on
Commit
b8ba544
1 Parent(s): b195e0a

Create start.sh

Browse files
Files changed (1) hide show
  1. start.sh +23 -0
start.sh ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ echo $ENCRYPT_DIR >/home/user/app/configs/encrypt_dirs.ini
4
+
5
+ # export FASTWEBDAV_HEADERS="Authorization: Bearer token, Content-Type: application/json"
6
+ # 组合自定义headers
7
+ header_string=""
8
+ if [ -n "$FASTWEBDAV_HEADERS" ]; then
9
+ IFS=',' read -ra headers <<< "$FASTWEBDAV_HEADERS"
10
+ for header in "${headers[@]}"; do
11
+ header_string="$header_string -h \"$header\""
12
+ done
13
+ fi
14
+
15
+ # 配置文件路径为/root/configs/
16
+ #/usr/bin/fast-webdav --workdir='/etc/fast-webdav' &
17
+ fast-webdav --workdir='/home/user/app' $header_string &
18
+
19
+ # Wait for any process to exit
20
+ wait -n
21
+
22
+ # Exit with status of process that exited first
23
+ exit $?