#!/bin/sh set -e setup_motd() { RESET='\033[0m' GREEN='\033[0;32m' BGREEN='\033[1;32m' YELLOW='\033[0;33m' CYAN='\033[0;36m' GREY='\033[1;30m' RED='\033[1;31m' BLUE='\033[1;34m' UBLUE='\033[4;34m' echo -e "╔═══════════════════════╦══════════════════════════════════════════════════════════════╗" echo -e "║${GREEN} ▄▄▄· ▄▄· ▪ ·▄▄▄▄ ${RESET}║ ${RED}Connection Notice${RESET} ║" echo -e "║${GREEN} ▐█ ▀█ ▐█ ▌▪██ ██▪ ██ ${RESET}╟──────────────────────────────────────────────────────────────╢" echo -e "║${GREEN} ▄█▀▀█ ██ ▄▄▐█·▐█· ▐█▌ ${RESET}║ ║" echo -e "║${GREEN} ▐█ ▪▐▌▐███▌▐█▌██. ██ ${RESET}║ ${YELLOW}This system is for the use of authorized users only.${RESET} ║" echo -e "║${GREEN} ▀ ▀ ·▀▀▀ ▀▀▀▀▀▀▀▀• ${RESET}║ ${YELLOW}All connections will be monitored and logged by the system.${RESET} ║" echo -e "║${GREEN} ▄▄▄▄· ▐▄• ▄ ${RESET}║ ║" echo -e "║${GREEN} ▐█ ▀█▪▪ █▌█▌▪ ${RESET}║ ${YELLOW}Connection issues? Contact ${UBLUE}${BLUE}acid.vegas@acid.vegas${YELLOW} for help.${RESET} ║" echo -e "║${GREEN} ▐█▀▀█▄ ▄█▀▄ ·██· ${RESET}║ ║" echo -e "║${GREEN} ██▄▪▐█▐█▌.▐▌▪▐█·█▌ ${RESET}║ ${YELLOW}Right about now, the funk soul brudda. Check it out now...${RESET} ║" echo -e "║${GREEN} ·▀▀▀▀ ▀█▄▀▪•▀▀ ▀▀ ${RESET}║ ║" echo -e "╚═══════════════════════╩══════════════════════════════════════════════════════════════╝" echo "${YELLOW}Hello ${CYAN}$(whoami)${YELLOW}! You are now connected to ${RED}$(hostname)" echo "${YELLOW}Type ${BGREEN}cmds${YELLOW} to see a list of commands available.${RESET}" echo "[${BLUE}RULES${RESET}]" echo " ${GREY}*${YELLOW} This is a private system that you are not to give out access to anyone" echo " without permission from the system admin. No illegal files or activites." echo " ${GREY}*${YELLOW} Avoid denial of service attacks out of respect for other users on the system." echo " ${GREY}*${YELLOW} Stay in your home directory, keep the system clean, and make regular backups." } setup_user() { sudo useradd -m -s /bin/bash $1 mkdir /home/$1/.scripts wget -O /home/$1/.bashrc https://git.supernets.org/acidvegas/acidbox/blob/master/files/.bashrc wget -O /home/$1/.scripts/cmds https://git.supernets.org/acidvegas/acidbox/blob/master/files/cmds wget -O /home/$1/.scripts/contact https://git.supernets.org/acidvegas/acidbox/blob/master/files/contact wget -O /home/$1/.scripts/rules https://git.supernets.org/acidvegas/acidbox/blob/master/files/rules wget -O /home/$1/.scripts/vhosts https://git.supernets.org/acidvegas/acidbox/blob/master/files/vhosts echo "clear && reset/home/$1/.bash_logout" echo "[[ -f ~/.bashrc ]] && . ~/.bashrc" > /home/$1/.bash_profile } setup_motd