-
Notifications
You must be signed in to change notification settings - Fork 77
/
damselfly-entrypoint.sh
37 lines (28 loc) · 1.07 KB
/
damselfly-entrypoint.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
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -e
if ! [ -z "$SYNO_THUMBS" ]; then
echo "Synology thumbnails enabled."
cmdlineargs="--syno"
fi;
if ! [ -z "$ONDEMAND_THUMBS" ]; then
echo "Thumbnail genration disabled. Thumbs will be generated on-demand."
cmdlineargs="--nothumbs"
fi;
#echo "Increasing inotify watch limit..."
#echo fs.inotify.max_user_instances=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
echo "Preparing to start Damselfly...."
# Let's turn this on for extra performance.
# https://devblogs.microsoft.com/dotnet/announcing-net-6/#dynamic-pgo
export DOTNET_TieredPGO=1
# Fix for https://github.com/dotnet/runtime/issues/70758
export COMPlus_EnableWriteXorExecute=0
cd /app
if ! [ -z "$DAMSELFLY_BLAZORSERVER" ];
then
echo " ./Damselfly.Web /pictures --config=/config --thumbs=/thumbs ${cmdlineargs}"
./Damselfly.Web /pictures --config=/config --thumbs=/thumbs ${cmdlineargs}
else
echo " ./Damselfly.Web.Server /pictures --config=/config --thumbs=/thumbs ${cmdlineargs}"
./Damselfly.Web.Server /pictures --config=/config --thumbs=/thumbs ${cmdlineargs}
fi;
exec "$@"