summaryrefslogtreecommitdiff
path: root/examples/etc/execline-shell
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-05-19 12:39:14 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-05-19 12:39:14 +0000
commit486b06b4125c00dd6ffce079432022a11930ce01 (patch)
treec8db5f303c1b6b3bc160d2eee25b2a62e0e517ab /examples/etc/execline-shell
parent80e1bb78abff39447d6312d837dd0d8155e63c8a (diff)
downloadexecline-486b06b4125c00dd6ffce079432022a11930ce01.tar.xz
Add execline-startup and execline-shell to examples/ again
Diffstat (limited to 'examples/etc/execline-shell')
-rwxr-xr-xexamples/etc/execline-shell18
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/etc/execline-shell b/examples/etc/execline-shell
new file mode 100755
index 0000000..ac8c141
--- /dev/null
+++ b/examples/etc/execline-shell
@@ -0,0 +1,18 @@
+#!/bin/execlineb -S0
+
+backtick -n defaulthome
+{
+ if -nt
+ {
+ backtick -n defaultuser { id -un }
+ importas -u defaultuser defaultuser
+ importas -D $defaultuser USER USER
+ redirfd -w 2 /dev/null
+ homeof ${USER}
+ }
+ s6-echo /
+}
+importas -u defaulthome defaulthome
+importas -D $defaulthome HOME HOME
+tryexec { ${HOME}/.execline-shell $@ }
+/bin/sh $@