更新文件: README.txt, system.xml, runwebdavsim.sh, rclonemount.sh, install.sh 等7个文件
This commit is contained in:
@ -19,7 +19,11 @@ cd embysim
|
||||
|
||||
4.按照emby.external目录中的alistservers.template.txt的样子自己生成alistservers.txt
|
||||
|
||||
cp alistservers.template.txt alistservers.txt
|
||||
alistservers.txt中的内容是要指向真实的alist地址,每行一个服务器,格式类似:
|
||||
|
||||
http://192.168.1.1:5678/,,
|
||||
|
||||
英文逗号分隔字段,其中第一段是服务器地址,第二段是USER:PASS,或ALIST-TOKEN,第三段忽略。
|
||||
|
||||
5.执行runembysim.sh
|
||||
|
||||
|
||||
BIN
embysim.tar.xz
BIN
embysim.tar.xz
Binary file not shown.
@ -39,6 +39,10 @@ echo "extract embysim data and prog finish"
|
||||
if [ ! -e alistservers.txt ]; then
|
||||
cp ../alistservers.template.txt alistservers.txt
|
||||
fi
|
||||
if [ ! -e emby.config/config/system.xml ]; then
|
||||
mv ../system.xml emby.config/config/system.xml
|
||||
chmod 777 emby.config/config/system.xml
|
||||
fi
|
||||
|
||||
echo "copy scripts..."
|
||||
mv ../webdav_simulator.amd64 ../htdocs ../runwebdavsim.sh ../killwebdavsim.sh ../tmuxrunwebdavsim.sh ../attach.sh ../rclonemount.sh ../runembysim.sh ../rclone.conf ../xy*.txt.xz .
|
||||
|
||||
@ -39,20 +39,6 @@ if [ "$SELFIP" == "" ]; then
|
||||
echo "DETECT SELF IP:${SELFIP}, if this is not correct, change SELFIP to your real ip"
|
||||
fi
|
||||
|
||||
curl -v -L $url
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "WARN:webdavsim is running, data may be outdate."
|
||||
else
|
||||
echo "run webdavsim..."
|
||||
chmod u+x tmuxrunwebdavsim.sh
|
||||
tmux -V
|
||||
if [ $? -eq 0 ]; then
|
||||
./tmuxrunwebdavsim.sh
|
||||
else
|
||||
nohup ./runwebdavsim.sh >/dev/null 2>&1 &
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "TRY CONNECT webdavsim, please wait... abount(30s)"
|
||||
webdavsimok="0"
|
||||
for i in 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 28 29 30
|
||||
@ -81,11 +67,15 @@ fi
|
||||
echo "ready to rclone mount, please wait...(abount 60s)"
|
||||
#rclone --config rclone.conf mount webdavsim-nas:/dav external/rclone.media --daemon --daemon-wait 60s --no-check-certificate --allow-other --umask 000 --default-permissions --dir-cache-time 1h --webdav-vendor rclone --vfs-cache-mode writes --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit 1G --buffer-size 64M --vfs-cache-max-age 1h --vfs-cache-max-size 10G --timeout 1800s --contimeout 10s --daemon-timeout 300s --poll-interval 10s --low-level-retries 2 --cache-dir rclone.cache --log-file rclone.log
|
||||
rclone --config rclone.conf mount webdavsim-nas:/dav external/rclone.media --daemon --daemon-wait 60s --no-check-certificate --allow-other --umask 000 --default-permissions --dir-cache-time 1h --webdav-vendor rclone --vfs-cache-mode off --timeout 1800s --contimeout 10s --daemon-timeout 300s --poll-interval 10s --low-level-retries 2 --log-file rclone.log
|
||||
echo "mount ok"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "mount ok"
|
||||
else
|
||||
echo "ERROR:rclone mount fail"
|
||||
fi
|
||||
|
||||
interface=$(ip route show | grep default | awk '{print $5}')
|
||||
SELFIP=$(ip addr show $interface | grep -w inet | awk '{print $2}' | cut -d/ -f1|head -1)
|
||||
echo "DETECT SELF IP:${SELFIP}, if this is not correct, change SELFIP to your real ip"
|
||||
#interface=$(ip route show | grep default | awk '{print $5}')
|
||||
#SELFIP=$(ip addr show $interface | grep -w inet | awk '{print $2}' | cut -d/ -f1|head -1)
|
||||
#echo "DETECT SELF IP:${SELFIP}, if this is not correct, change SELFIP to your real ip"
|
||||
|
||||
if [ "$SELFIP" != "" ]; then
|
||||
if [ ! -e config.selfip.modified.dat ]; then
|
||||
|
||||
@ -37,6 +37,20 @@ interface=$(ip route show | grep default | awk '{print $5}')
|
||||
export SELFIP=$(ip addr show $interface | grep -w inet | awk '{print $2}' | cut -d/ -f1|head -1)
|
||||
echo "DETECT SELF IP:${SELFIP}, if this is not correct, change SELFIP to your real ip"
|
||||
|
||||
curl -v -L $url
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "WARN:webdavsim is running, data may be outdate."
|
||||
else
|
||||
echo "run webdavsim..."
|
||||
chmod u+x tmuxrunwebdavsim.sh
|
||||
tmux -V
|
||||
if [ $? -eq 0 ]; then
|
||||
./tmuxrunwebdavsim.sh
|
||||
else
|
||||
nohup ./runwebdavsim.sh >/dev/null 2>&1 &
|
||||
fi
|
||||
fi
|
||||
|
||||
num=$(mount |grep "/rclone.media"|wc -l)
|
||||
if [ $num -gt 0 ]; then
|
||||
echo "WARN: rclone.media already mounted, the webdav content may be outdate"
|
||||
@ -56,7 +70,15 @@ fi
|
||||
# -e HTTPS_PROXY=http://192.168.101.1:8118 \
|
||||
# --net=host \
|
||||
|
||||
cores=$(cat /proc/cpuinfo |grep processor|wc -l)
|
||||
cpus=$(expr $cores / 2)
|
||||
if [ $cpus -lt 1 ]; then
|
||||
cpus="1"
|
||||
fi
|
||||
echo "use cpus:$cpus"
|
||||
|
||||
docker run -d \
|
||||
--cpus $cpus \
|
||||
--sysctl net.ipv6.conf.all.disable_ipv6=1 \
|
||||
--name embysim \
|
||||
-v $progdir/emby.config:/config \
|
||||
|
||||
@ -22,10 +22,10 @@ if [ "$SELFIP" == "" ]; then
|
||||
echo "DETECT SELF IP:${SELFIP}, if this is not correct, change SELFIP to your real ip"
|
||||
fi
|
||||
|
||||
#rm -rf tmp
|
||||
#mkdir tmp
|
||||
#chmod 777 tmp
|
||||
#export TMPDIR=tmp
|
||||
rm -rf tmp
|
||||
mkdir tmp
|
||||
chmod 777 tmp
|
||||
export TMPDIR=tmp
|
||||
unset LD_PRELOAD
|
||||
machine=$(uname -m)
|
||||
if [[ "$machine" == *"arm"* || "$machine" == *"aarch"* ]]; then
|
||||
|
||||
67
system.xml
Normal file
67
system.xml
Normal file
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0"?>
|
||||
<ServerConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<EnableDebugLevelLogging>false</EnableDebugLevelLogging>
|
||||
<EnableAutoUpdate>true</EnableAutoUpdate>
|
||||
<LogFileRetentionDays>3</LogFileRetentionDays>
|
||||
<RunAtStartup>true</RunAtStartup>
|
||||
<IsStartupWizardCompleted>true</IsStartupWizardCompleted>
|
||||
<EnableUPnP>true</EnableUPnP>
|
||||
<PublicPort>8096</PublicPort>
|
||||
<PublicHttpsPort>8920</PublicHttpsPort>
|
||||
<HttpServerPortNumber>8096</HttpServerPortNumber>
|
||||
<HttpsPortNumber>8920</HttpsPortNumber>
|
||||
<EnableHttps>false</EnableHttps>
|
||||
<IsPortAuthorized>true</IsPortAuthorized>
|
||||
<AutoRunWebApp>true</AutoRunWebApp>
|
||||
<EnableRemoteAccess>true</EnableRemoteAccess>
|
||||
<LogAllQueryTimes>false</LogAllQueryTimes>
|
||||
<EnableCaseSensitiveItemIds>true</EnableCaseSensitiveItemIds>
|
||||
<MetadataNetworkPath />
|
||||
<PreferredMetadataLanguage>zh-CN</PreferredMetadataLanguage>
|
||||
<MetadataCountryCode>CN</MetadataCountryCode>
|
||||
<SortRemoveWords>
|
||||
<string>the</string>
|
||||
<string>a</string>
|
||||
<string>an</string>
|
||||
<string>das</string>
|
||||
<string>der</string>
|
||||
<string>el</string>
|
||||
<string>la</string>
|
||||
</SortRemoveWords>
|
||||
<LibraryMonitorDelaySeconds>90</LibraryMonitorDelaySeconds>
|
||||
<EnableDashboardResponseCaching>true</EnableDashboardResponseCaching>
|
||||
<ImageSavingConvention>Compatible</ImageSavingConvention>
|
||||
<EnableAutomaticRestart>true</EnableAutomaticRestart>
|
||||
<PreferredDetectedRemoteAddressFamily>InterNetwork</PreferredDetectedRemoteAddressFamily>
|
||||
<WanDdns />
|
||||
<UICulture>zh-CN</UICulture>
|
||||
<RemoteClientBitrateLimit>0</RemoteClientBitrateLimit>
|
||||
<LocalNetworkSubnets />
|
||||
<LocalNetworkAddresses />
|
||||
<EnableExternalContentInSuggestions>true</EnableExternalContentInSuggestions>
|
||||
<RequireHttps>false</RequireHttps>
|
||||
<IsBehindProxy>false</IsBehindProxy>
|
||||
<RemoteIPFilter />
|
||||
<IsRemoteIPFilterBlacklist>false</IsRemoteIPFilterBlacklist>
|
||||
<ImageExtractionTimeoutMs>0</ImageExtractionTimeoutMs>
|
||||
<PathSubstitutions />
|
||||
<UninstalledPlugins />
|
||||
<CollapseVideoFolders>false</CollapseVideoFolders>
|
||||
<EnableOriginalTrackTitles>false</EnableOriginalTrackTitles>
|
||||
<VacuumDatabaseOnStartup>false</VacuumDatabaseOnStartup>
|
||||
<SimultaneousStreamLimit>0</SimultaneousStreamLimit>
|
||||
<DatabaseCacheSizeMB>2048</DatabaseCacheSizeMB>
|
||||
<EnableSqLiteMmio>false</EnableSqLiteMmio>
|
||||
<PlaylistsUpgradedToM3U>true</PlaylistsUpgradedToM3U>
|
||||
<ImageExtractorUpgraded1>true</ImageExtractorUpgraded1>
|
||||
<EnablePeopleLetterSubFolders>true</EnablePeopleLetterSubFolders>
|
||||
<OptimizeDatabaseOnShutdown>true</OptimizeDatabaseOnShutdown>
|
||||
<DatabaseAnalysisLimit>4000</DatabaseAnalysisLimit>
|
||||
<DisableAsyncIO>false</DisableAsyncIO>
|
||||
<MigratedToUserItemShares8>true</MigratedToUserItemShares8>
|
||||
<MigratedLibraryOptionsToDb>true</MigratedLibraryOptionsToDb>
|
||||
<AllowLegacyLocalNetworkPassword>false</AllowLegacyLocalNetworkPassword>
|
||||
<EnableSavedMetadataForPeople>false</EnableSavedMetadataForPeople>
|
||||
<TvChannelsRefreshed>true</TvChannelsRefreshed>
|
||||
<ProxyHeaderMode>AllAddresses</ProxyHeaderMode>
|
||||
</ServerConfiguration>
|
||||
Reference in New Issue
Block a user