Edited README, added initial client tools
This commit is contained in:
19
client/bin/disco-sh-exec
Executable file
19
client/bin/disco-sh-exec
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
DISCOROOT=/var/disco/testfs
|
||||
|
||||
mount | grep $DISCOROOT >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
./disco-fs-mount
|
||||
fi
|
||||
|
||||
# Strip out any shebang and put the script in the root
|
||||
mkdir -p ${DISCOROOT}/execs/$(dirname $2)
|
||||
cat $1 | sed s/'^#!.*'/''/g > ${DISCOROOT}/execs/$2
|
||||
if [ "$NOOP" != "" ]; then
|
||||
chroot ${DISCOROOT}/chroot /bin/bash --restricted $2
|
||||
else
|
||||
chroot ${DISCOROOT}/chroot /bin/bash $2
|
||||
fi
|
||||
./disco-fs-unmount
|
||||
exit $?
|
||||
Reference in New Issue
Block a user