diff --git a/README.md b/README.md index a3f9249..84db281 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,10 @@ To start services immediately, in Archbox, do : ``` sudo archboxctl exec ``` + +##### Custom command on boot +You can create a shell script located at ```/etc/archbox.rc``` and ```archboxinit``` will execute it in Archbox on boot. + #### Desktop entries Use ```archbox-desktop``` to install desktop entries in chroot to host (installed to ```~/.local/share/applications/archbox```) #### Lauching apps via rofi diff --git a/archboxinit.bash b/archboxinit.bash index fc748e3..f085b58 100644 --- a/archboxinit.bash +++ b/archboxinit.bash @@ -48,6 +48,12 @@ case $1 in chroot $CHROOT /bin/su -c "/usr/local/bin/archboxctl exec $j" > /dev/null 2>&1 & fi done + if [[ -e /etc/archbox.rc ]]; then + cp /etc/archbox.rc /tmp/archbox.rc + chmod +x /tmp/archbox.rc + chroot $CHROOT /bin/su -c '/tmp/archbox.rc' > /tmp/archbox.rc.log 2>&1 + rm /tmp/archbox.rc + fi exit 0 ;; stop)