Initial commit
This commit is contained in:
30
rootfs/entrypoint.sh
Executable file
30
rootfs/entrypoint.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
function custom_bashrc {
|
||||
echo '
|
||||
export LS_OPTIONS="--color=auto"
|
||||
alias "ls=ls $LS_OPTIONS"
|
||||
alias "ll=ls $LS_OPTIONS -la"
|
||||
alias "l=ls $LS_OPTIONS -lA"
|
||||
'
|
||||
}
|
||||
|
||||
function set_bashrc {
|
||||
echo "-----------------------------------------"
|
||||
echo " .bashrc file setup..."
|
||||
echo "-----------------------------------------"
|
||||
custom_bashrc | tee /root/.bashrc
|
||||
echo 'export PS1="\[\e[35m\][\[\e[31m\]\u\[\e[36m\]@\[\e[32m\]\h\[\e[90m\] \w\[\e[35m\]]\[\e[0m\]# "' >> /root/.bashrc
|
||||
for i in $(ls /home); do echo 'export PS1="\[\e[35m\][\[\e[33m\]\u\[\e[36m\]@\[\e[32m\]\h\[\e[90m\] \w\[\e[35m\]]\[\e[0m\]$ "' >> /home/${i}/.bashrc; done
|
||||
}
|
||||
|
||||
set_bashrc
|
||||
|
||||
CMD="$@"
|
||||
[ -z "$CMD" ] && export CMD="supervisord -c /etc/supervisor/supervisord.conf"
|
||||
|
||||
exec $CMD
|
||||
|
||||
exit $?
|
||||
Reference in New Issue
Block a user