this is my life now. infinite frustration cast upon me by an evil curse

This commit is contained in:
2026-05-23 00:53:33 -06:00
parent 2cf11eadc7
commit 657b53c8fb
+20 -14
View File
@@ -23,7 +23,7 @@ groups_username=("tty" "dialout" "plugdev" "sudo" "www-data")
home_username="/home/${new_username}" home_username="/home/${new_username}"
# services shit # services shit
services_to_enable=("ssh" "apache2" "xrdp" "avahi-daemon" "avahi-utils") services_to_enable=("ssh" "apache2" "xrdp" "avahi-daemon")
services_to_disable=("nginx") services_to_disable=("nginx")
# save here to use in error_handle function # save here to use in error_handle function
@@ -106,7 +106,7 @@ reset_root() {
echo "reset_root: START" echo "reset_root: START"
echo "reset_root: change password" echo "reset_root: change password"
sudo passwd root sudo passwd root
chkcode $? checkcode $?
echo "reset_root: FINISHED" echo "reset_root: FINISHED"
} }
@@ -150,20 +150,25 @@ pyenv() {
curl -fsSL https://pyenv.run | bash &> /dev/null curl -fsSL https://pyenv.run | bash &> /dev/null
checkcode $? checkcode $?
echo "pyenv: adding exports to $home_username/.bashrc" echo "pyenv: adding exports to $home_username/.bashrc"
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> $home_username/.bashrc echo 'export PYENV_ROOT="$HOME/.pyenv"' >> "$home_username/.bashrc"
checkcode $? checkcode $?
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> $home_username/.bashrc echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> "$home_username/.bashrc"
checkcode $? checkcode $?
echo 'eval "$(pyenv init - bash)"' >> $home_username/.bashrc echo 'eval "$(pyenv init -)"' >> "$home_username/.bashrc"
checkcode $? checkcode $?
echo "pyenv: sourcing to $home_username/.bashrc" echo "pyenv: sourcing to $home_username/.bashrc"
source $home_username/.bashrc source "$home_username/.bashrc"
checkcode $? checkcode $?
echo "pyenv: installing latest python3" echo "pyenv: installing latest python3"
pyenv install 3:latest &> /dev/null latest_python=$(pyenv install --list | grep -E '^[[:space:]]*3\.[0-9]+\.[0-9]+$' | tail -1 | tr -d '[:space:]')
if [ -z "$latest_python" ]; then
echo "pyenv: could not detect latest Python 3 version"
exit 1
fi
pyenv install "$latest_python" &> /dev/null
checkcode $? checkcode $?
echo "pyenv: setting latest python3 as global" echo "pyenv: setting latest python3 as global"
pyenv global 3:latest &> /dev/null pyenv global "$latest_python" &> /dev/null
checkcode $? checkcode $?
reload_shell reload_shell
echo "pyenv: FINISHED" echo "pyenv: FINISHED"
@@ -203,15 +208,16 @@ wordists() {
services() { services() {
echo "services: START" echo "services: START"
echo "services: disable" echo "services: disable"
for service in $services_to_disable; do for service in "${services_to_disable[@]}"; do
echo "services: disabling $service" echo "services: disabling $service"
sudo systemctl disable $service sudo systemctl disable "$service"
chkcode $? checkcode $?
echo "services: stopping $service" echo "services: stopping $service"
sudo systemctl stop "$service" sudo systemctl stop "$service"
chkcode $? checkcode $?
done
echo "services: enable" echo "services: enable"
for service in $services_to_enable; do for service in "${services_to_enable[@]}"; do
echo "services: enabling $service" echo "services: enabling $service"
sudo systemctl enable "$service" &> /dev/null sudo systemctl enable "$service" &> /dev/null
checkcode $? checkcode $?
@@ -238,7 +244,7 @@ customscripts() {
bash /usr/share/customscripts/configure_webhook.sh full bash /usr/share/customscripts/configure_webhook.sh full
checkcode $? checkcode $?
echo "customscripts: updating user .bashrc" echo "customscripts: updating user .bashrc"
echo 'export PATH="$PATH:/usr/share/customscripts' >> $home_username/.bashrc echo 'export PATH="$PATH:/usr/share/customscripts"' >> "$home_username/.bashrc"
checkcode $? checkcode $?
reload_shell reload_shell
} }