Skip to content

Commit 71ce8ef

Browse files
authored
Merge pull request #9 from linuxserver/mod-helper/main
2 parents a5c367e + 77d0dcd commit 71ce8ef

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
252252

253253
## Versions
254254

255+
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
255256
* **10.12.21:** - Update deprecated connectionToken arg.
256257
* **30.11.21:** - Fix app folder permissions, add the optional sudo password vars.
257258
* **29.11.21:** - Create `.profile` and `.bashrc` for the user.

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ app_setup_block: |
6161
6262
# changelog
6363
changelogs:
64+
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }
6465
- { date: "10.12.21:", desc: "Update deprecated connectionToken arg." }
6566
- { date: "30.11.21:", desc: "Fix app folder permissions, add the optional sudo password vars." }
6667
- { date: "29.11.21:", desc: "Create `.profile` and `.bashrc` for the user." }

root/usr/local/bin/install-extension

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
3+
4+
_install=(/app/openvscode-server/server.sh "--extensions-dir" "/config/.vscode-remote/extensions" "--install-extension")
5+
6+
if [ "$(whoami)" == "abc" ]; then
7+
"${_install[@]}" "$@"
8+
else
9+
s6-setuidgid abc "${_install[@]}" "$@"
10+
fi

0 commit comments

Comments
 (0)