immortalwrt/package/zxlhhyccc/luci-app-xunlei/root/etc/xware/cfg
2019-08-04 07:14:34 +08:00

19 lines
392 B
Bash
Executable File

#!/bin/sh /etc/rc.common
device=$(uci get xunlei.config.device)
file=$(uci get xunlei.config.file)
mountpoint="`mount | grep "$device" | awk '{print $3;exit}'`"
[ -f "$file/xunlei/cfg/thunder_mounts.cfg" ] && cfg="$file/xunlei/cfg/thunder_mounts.cfg"
[ ! -f "$cfg" ] && {
cfg="/$file/xunlei/cfg/thunder_mounts.cfg"
cat > "$cfg" << EOF
avaliable_mount_path_pattern
{
$mountpoint
}
EOF
}