#!/bin/bash #################################################################################################### #### author: SlickStack ############################################################################ #### link: https://slickstack.io ################################################################### #### mirror: http://mirrors.slickstack.io/bash/ss-install-ubuntu-utils.txt ######################### #### path: /var/www/ss-install-ubuntu-utils ######################################################## #### destination: n/a (not a boilerplate) ########################################################## #### purpose: Reinstalls the Ubuntu (OS) utilities for SlickStack servers (idempotent) ############# #### module version: Ubuntu 20.04 LTS ############################################################## #### sourced by: ss-install ######################################################################## #### bash aliases: ss install ubuntu utils, ss install utils ####################################### #################################################################################################### ## SS-CONFIG MUST BE PROPERLY CONFIGURED AND ON CURRENT BUILD BEFORE RUNNING SS-INSTALL ## ## ENSURE YOUR SS-CONFIG BUILD REMAINS CURRENT BY RUNNING SS-UPDATE OCCASIONALLY ## ## include SlickStack configuration ## source /var/www/ss-config ## include SlickStack functions ## source /var/www/ss-functions #################################################################################################### #### SS-Install-Ubuntu-Utils: Message (Begin Script) ############################################### #################################################################################################### ## this is a simple message that announces to the shell the purpose of this bash script ## ## it will only be noticed by sudo users who manually call ss core bash scripts ## ## echo message ## echo -e "${PURPLE}Running ss-install-ubuntu-utils: Reinstalls the Ubuntu (OS) utilities for SlickStack servers (idempotent)... ${NOCOLOR}" sleep "$SLEEP_MESSAGE_BEGIN" #################################################################################################### #### SS-Install-Ubuntu-Utils: Cleanup Temporary Files ############################################## #################################################################################################### ## delete tmp files ## rm /tmp/custom-shell-prompt* #################################################################################################### #### SS-Install-Ubuntu-Utils: Prettify The Shell Prompt For All Ubuntu Users ####################### #################################################################################################### ## download latest versions ## wget -O /tmp/custom-shell-prompt http://mirrors.slickstack.io/ubuntu/custom-shell-prompt.txt ## delete old one ## rm /etc/profile.d/custom-shell-prompt ## copy files to their destinations ## cp /tmp/custom-shell-prompt /etc/profile.d/custom-shell-prompt.sh #################################################################################################### #### SS-Install-Misc: Install Various Ubuntu Linux Utilities (Etc) ################################# #################################################################################################### ## set default editor to nano ## update-alternatives --set editor /bin/nano ## set timezone ## if [[ -z "$SS_TIMEZONE" ]]; then timedatectl set-timezone UTC else timedatectl set-timezone $SS_TIMEZONE fi ## install update-manager-core ## apt install update-manager-core ## install Linux utilities (Zip, Unzip, DOS2Unix) ## apt install zip unzip dos2unix ## install rsync (some cloud networks apparently remove it from Ubuntu ISO for some reason as per GitHub issues) ## apt install rsync ## install Git ## apt install git ## install debconf-utils for some APT debug tools (move this to ss-install-misc) ## apt install debconf-utils #################################################################################################### #### SS-Install-Ubuntu-Utils: Reset Permissions (Ubuntu Utils) ##################################### #################################################################################################### ## run ss-perms-ubuntu-utils ## source /var/www/ss-perms-ubuntu-utils #################################################################################################### #### SS-Install-Ubuntu-Utils: Cleanup Temporary Files ############################################## #################################################################################################### ## delete tmp files ## rm /tmp/custom-shell-prompt* #################################################################################################### #### SS-Install-Ubuntu-Utils: Touch Timestamp File (End Script) #################################### #################################################################################################### ## this is a dummy timestamp file that will remember the last time this script was run ## ## it can be useful for developer reference and is sometimes used by SlickStack ## ## script timestamp ## touch /var/www/meta/.timestamp-ss-install-ubuntu-utils #################################################################################################### #### SlickStack: External References Used To Improve This Script (Thanks, Interwebz) ############### #################################################################################################### ## Ref: https://github.com/littlebizzy/slickstack/issues/77 ## Ref: https://help.ubuntu.com/community/rsync ## SS_EOF