File size: 648 Bytes
b8ba544
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

echo $ENCRYPT_DIR >/home/user/app/configs/encrypt_dirs.ini

# export FASTWEBDAV_HEADERS="Authorization: Bearer token, Content-Type: application/json"
# 组合自定义headers
header_string=""
if [ -n "$FASTWEBDAV_HEADERS" ]; then
    IFS=',' read -ra headers <<< "$FASTWEBDAV_HEADERS"
    for header in "${headers[@]}"; do
        header_string="$header_string -h \"$header\""
    done
fi

# 配置文件路径为/root/configs/
#/usr/bin/fast-webdav --workdir='/etc/fast-webdav' &
fast-webdav --workdir='/home/user/app' $header_string &

# Wait for any process to exit
wait -n
  
# Exit with status of process that exited first
exit $?