My UNRAID go file:

cat go
#!/bin/bash
#  ===================================================
#  == Anyhing added must be available without ARRAY ==
#  == -- Basically (/root, /etc, /bin, or /var)     ==
#  ===================================================

#  == Add Exports                                   == 
echo 'export HISTCONTROL="ignoreboth:erasedups"' >> /root/.bash_profile

#  == Append additional config files                ==
cat /boot/config/go-docker-compose.cfg >> /root/.bash_profile
cat /boot/config/go-aliases.cfg >> /root/.bash_profile
cat /boot/config/go-prompt.cfg >> /root/.bash_profile

#  == Start Management Utility GUI                  ==
/usr/local/sbin/emhttp &
#--- go-docker-compose.cfg ---
alias docker-compose='docker run --rm \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v "$PWD:$PWD" \
    -w="$PWD" \
    docker/compose:latest'
#--- go-docker-compose.cfg ---
#--- go-aliases.cfg --- 
alias boot='cd /boot'
alias cfg='cd /boot/config'
alias ut='cd /boot/config/plugins/dockerMan/templates-user'
alias appdata='cd /mnt/user/appdata'
#--- go-aliases.cfg --- 
#--- go-prompt.cfg ---
parse_git_branch() {
    git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\[\033[01;2m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;32m\]\$(parse_git_branch)\[\033[00m\]\$ "
#--- go-prompt.cfg ---

See UNRAID boot sequence

Leave a Reply