archbox/archboxcommand.bash

8 lines
177 B
Bash
Executable File

#!/bin/bash
source /etc/archbox.conf
COMMAND=$(echo $@ | tr ' ' '\ ')
[[ $1 = "--enter" ]] && chroot $CHROOT /bin/su $USER \
|| chroot $CHROOT /bin/su -c "$COMMAND" $USER