Merge pull request #95 from linuxserver/mod-helper

Add helper for mods
This commit is contained in:
aptalca 2021-12-29 16:18:57 -05:00 committed by GitHub
commit 0a12acb21e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -266,6 +266,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
* **06.12.21:** - Add `DEFAULT_WORKSPACE` env var. * **06.12.21:** - Add `DEFAULT_WORKSPACE` env var.
* **29.11.21:** - Rebase to Ubuntu focal. * **29.11.21:** - Rebase to Ubuntu focal.
* **16.09.21:** - Fix slow `chown` on large workspace (contents of workspace folder no longer chowned). * **16.09.21:** - Fix slow `chown` on large workspace (contents of workspace folder no longer chowned).

View File

@ -77,6 +77,7 @@ app_setup_block: |
# changelog # changelog
changelogs: changelogs:
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }
- { date: "06.12.21:", desc: "Add `DEFAULT_WORKSPACE` env var." } - { date: "06.12.21:", desc: "Add `DEFAULT_WORKSPACE` env var." }
- { date: "29.11.21:", desc: "Rebase to Ubuntu focal." } - { date: "29.11.21:", desc: "Rebase to Ubuntu focal." }
- { date: "16.09.21:", desc: "Fix slow `chown` on large workspace (contents of workspace folder no longer chowned)." } - { date: "16.09.21:", desc: "Fix slow `chown` on large workspace (contents of workspace folder no longer chowned)." }

View File

@ -0,0 +1,10 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
_install=(/usr/local/bin/code-server "--extensions-dir" "/config/extensions" "--install-extension")
if [ "$(whoami)" == "abc" ]; then
"${_install[@]}" "$@"
else
s6-setuidgid abc "${_install[@]}" "$@"
fi