Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #19 from linuxserver-labs/s6v3
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad authored Mar 5, 2023
2 parents 019331c + 3e0a97a commit 52268b2
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 38 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
bash \
curl \
gnupg \
jsvc \
libcap2 \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **01.03.23:** - Migrate to s6v3
* **12.01.22:** - Switch to MongoDB 4.4
* **29.09.21:** - Documentation updates
* **13.08.21:** - Initial Release
35 changes: 0 additions & 35 deletions root/etc/cont-init.d/50-config

This file was deleted.

15 changes: 15 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-adduser/branding
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
───────────────────────────────────────

██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝

█ █▀▀▄ █▀▀▄ █▀▀
█ █▄▄█ █▀▀▄ ▀▀▄
▀▀▀ ▀ ▀ ▀▀▀▀ ▀▀▀

Brought to you by linuxserver.io
───────────────────────────────────────
Empty file.
Empty file.
48 changes: 48 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-omada-config/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

#Symlinks
symlinks=( \
/app/omada/data \
/app/omada/properties \
)

shopt -s globstar dotglob

for i in "${symlinks[@]}"; do
if [[ -d /config/"$(basename "$i")" && ! -L "$i" ]]; then
rm -rf "$i"
fi
if [[ ! -d /config/"$(basename "$i")" && ! -L "$i" ]]; then
mv "$i" /config/
fi
if [[ -d /config/"$(basename "$i")" && ! -L "$i" ]]; then
ln -s /config/"$(basename "$i")" "$i"
fi
done

symlinks=( \
/app/omada/logs \
/app/omada/work \
)

for i in "${symlinks[@]}"; do
if [[ -d /config/"$(basename "$i")" && ! -L "$i" ]]; then
rm -rf "$i"
fi
if [[ ! -d /config/"$(basename "$i")" && ! -L "$i" ]]; then
mkdir -p /config/"$(basename "$i")"
fi
if [[ -d /config/"$(basename "$i")" && ! -L "$i" ]]; then
ln -s /config/"$(basename "$i")" "$i"
fi
done

shopt -u globstar dotglob

mkdir -p /app/omada/data/autobackup

#Permissions
lsiown -R abc:abc \
/config \
/app
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/init-omada-config/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/init-omada-config/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-omada-config/run
Empty file.
3 changes: 2 additions & 1 deletion root/etc/services.d/omada/run → root/etc/s6-overlay/s6-rc.d/svc-omada/run
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

case $(uname -m) in
x86_64)
Expand Down Expand Up @@ -34,4 +35,4 @@ exec \
-XX:HeapDumpPath=${LOG_DIR}/java_heapdump.hprof \
-Djava.awt.headless=true \
-Dlog4j2.formatMsgNoLookups=true \
com.tplink.smb.omada.starter.OmadaLinuxMain
com.tplink.smb.omada.starter.OmadaLinuxMain
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-omada/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
Empty file.

0 comments on commit 52268b2

Please sign in to comment.