-
-
Notifications
You must be signed in to change notification settings - Fork 128
Expand file tree
/
Copy pathrun
More file actions
executable file
·30 lines (27 loc) · 808 Bytes
/
run
File metadata and controls
executable file
·30 lines (27 loc) · 808 Bytes
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
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# create directories
mkdir -p \
/config/{log,data/plugins/configurations,data/transcodes,cache} \
/data \
/transcode
# test for and enable IPv6 support
if [[ ! -f /config/network.xml ]]; then
if test -f /proc/net/if_inet6; then
echo '<?xml version="1.0" encoding="utf-8"?>
<NetworkConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<EnableIPv6>true</EnableIPv6>
<LocalNetworkAddresses>
<string>::</string>
</LocalNetworkAddresses>
</NetworkConfiguration>' > /config/network.xml
fi
fi
# permissions
lsiown abc:abc \
/config \
/config/* \
/config/data/plugins \
/config/data/plugins/configurations \
/config/data/transcodes \
/transcode