ig we postin now

This commit is contained in:
PrincessPi committed 2026-10-26 05:02:19 -06:00
1 parent 586e8746be
commit ff76074355
12 files changed
+1019 -636

No files matched your search

-109
View File
@@ -1,109 +0,0 @@
* General Guides and Scripts for:
* Ubuntu Server LAMP (20.04 LTS)
* Dark Web Hosting (LAMP on 20.04 LTS)
* General Windows 10 and mobile security guide
Install customscripts on linux
with full upgrade and package install
```bash
script=/tmp/install_script.sh && curl -s https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/customscripts/install_script.sh > $script && chmod +x $script && $SHELL -c "$script full" && $SHELL /usr/share/customscripts/configure_webhook.sh full && exec $SHELL
```
without full upgrade and package install
```bash
script=/tmp/install_script.sh && curl -s https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/customscripts/install_script.sh > $script && chmod +x $script && $SHELL -c "$script" && $SHELL /usr/share/customscripts/configure_webhook.sh && exec $SHELL
```
## Usage
### Linux
#### git helpers
* `gitinitshit`
* `gitshit`
* `gitsync`
* `syncstatus`
* `waypoint`
* `setup_git.sh`
#### security helpers
* `add_user_ssh`
* `backup.sh`
* `binwalk-tool`
* `configuree_webhook.sh`
* `connect-wifi`
* `crowdsec.sh`
* `find_bytes`
* `fix-wifi`
* `add_user_ssh`
* `wifi_monitor`
* `wifi-monitor-airX`
* `recursive-analysis`
* `large_file_search_for_hash`
* `randomtoken`
* `alfa_install_kali.sh`
* `torsilly.sh`
#### monitoring
* `mon-watch`
* `monitor_pid`
* `ifnet`
* `webhook`
* `FIND_THE_FUCKING_PI`
* `dirstatt`
#### hosting
* `add_apache2_site`
#### setup and general scripts
* `ifnet`
* `install_script.sh`
* `pyenv_setup`
* `python_pyenv_setup.sh`
* `xrdp-start`
* `add_apache2_site`
* `download_file_list`
* `download_file_list_raw`
* `message_users`
* `UNFUCK_HOMEDIR_PERMS.sh`
* `pi_create_image`
* `pi_create_image_from_img`
* `ramdisk_gimme`
#### for fun
* `donut`
* `friendlyfriend`
* `annoy_the_fuck_out_of_commit_message_nerds`
#### media
* `easylistdownload`
* `download_file_list`
### Windowwz
#### git helpers
* `gitshit.ps1`
* `gitsync.ps1`
* `syncstatus.ps1`
* `waypoint.ps1`
#### linux-like hashing helpers
* `winhash.ps1`
* `md5sum.ps1`
* `sha256sum.ps1`
* `sha384sum.ps1`
* `sha512sum.ps1`
#### remote host tools
* `ssh-wait-loop.ps1`
* `wait-on-host.ps1`
* `testtime.ps1`
#### Windows system
* `redundant-backup.ps1`
#### anti-productivity
* `IM_SO_TIRED_BOSS.ps1`
### Clean up Windows!
```powershell
iwr https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random) -OutFile $env:TEMP\windows-repair-temp.ps1; powershell -nop -ep Bypass -File $env:TEMP\windows-repair-temp.ps1
```
todo:
1. windwows gitinitshit
2. convert windows-repair.bat to powershell and add more features and checks
1. automatic elevation request
2. update and improve security scan via windows defender
File diff suppressed because it is too large. Load diff
-85
View File
@@ -1,85 +0,0 @@
param (
[Parameter(Mandatory = $true, Position = 0)]
[string]$Ext1,
[Parameter(Mandatory = $true, Position = 1)]
[string]$Ext2,
[int]$Jobs = 4 # Number of simultaneous conversions
)
$sourceExt = $Ext1.TrimStart('.')
$targetExt = $Ext2.TrimStart('.')
$audioExts = @('opus', 'ogg', 'flac', 'wav')
$files = Get-ChildItem -File -Recurse -Filter "*.$sourceExt"
if ($files.Count -eq 0) {
Write-Host "No files matching *.$sourceExt found." -ForegroundColor Yellow
return
}
Write-Host "Starting conversion using $Jobs parallel jobs..." -ForegroundColor Green
$files | ForEach-Object -Parallel {
$file = $_
$targetExt = $using:targetExt
$audioExts = $using:audioExts
$outputPath = Join-Path -Path $file.DirectoryName -ChildPath "$($file.BaseName).$targetExt"
$relativePath = Resolve-Path -Path $file.FullName -Relative
Write-Host "Processing: $relativePath" -ForegroundColor Cyan
if ($audioExts -contains $targetExt.ToLower()) {
ffmpeg -y -i $file.FullName -c:a libopus -b:a 128k -vbr on $outputPath 2>$null
} else {
# -preset 8 drastically speeds up SVT-AV1 while maintaining high quality
ffmpeg -y -i $file.FullName -c:v libsvtav1 -crf 26 -preset 8 -c:a libopus -b:a 128k $outputPath 2>$null
}
} -ThrottleLimit $Jobs
Write-Host "Finished processing $($files.Count) file(s)." -ForegroundColor Green
# -------------------------------------------------------------------------
# Step 1: Recursively delete all existing .sha256 files
# -------------------------------------------------------------------------
Write-Host "Deleting existing .sha256 files recursively..." -ForegroundColor Yellow
Get-ChildItem -Path . -Recurse -Filter "*.sha256" -File | Remove-Item -Force
# -------------------------------------------------------------------------
# Step 2: Run checksums in current directory and every subdirectory
# -------------------------------------------------------------------------
Write-Host "Generating checksums in each subfolder..." -ForegroundColor Cyan
# Gather current working directory and all child directories
$allDirs = @((Get-Item .).FullName) + (Get-ChildItem -Path . -Recurse -Directory | Select-Object -ExpandProperty FullName)
foreach ($dir in $allDirs) {
Push-Location $dir
try {
Write-Host "Updating checksums in: $dir" -ForegroundColor Gray
checksum * -o
} finally {
Pop-Location
}
}
# -------------------------------------------------------------------------
# Step 3: Recursively verify checksums in each directory
# -------------------------------------------------------------------------
Write-Host "Verifying checksums in each subfolder..." -ForegroundColor Cyan
foreach ($dir in $allDirs) {
Push-Location $dir
try {
if (Test-Path "checksums.sha256") {
Write-Host "Verifying: $dir" -ForegroundColor Gray
checksum -c checksums.sha256
}
} finally {
Pop-Location
}
}
Write-Host "All conversions, checksum creations, and verifications completed successfully." -ForegroundColor Green
-74
View File
@@ -1,74 +0,0 @@
# `pwsh.exe -c "`"C:\path\to\redundant-backup.ps1`" -logFile `"`" -simpleLogFile `"`""`
# `Start-Process -filepath "C:\path\to\redundant-backup.ps1" -logFile "" -simpleLogFile ""`
# `redundant-backup -logFile "" -simpleLogFile ""`
param([string] $logFile,
[string] $simpleLogFile
)
$startUnixSeconds = get-date -uformat "%s" # unix epoch seconds for duration
$startDateHuman = get-date # human readable begin date
$startDateFilename = get-date -format 'yyyy-MM-dd-hhmm' # filename friendly date format
$warningFile = "C:\Users\human\OneDrive\Desktop\backup_error_$startDateFilename.log" # file to create to notify of a failure
$jobName = "Weekly-Backup-$startDateFilename" # name for job in case wanna restart an interrupted one
$resticRunning = "E:\restic_backups_rolling" # from dir (restic)
$redundantLocal = "D:\restic_backups_redundancy_rolling" # to dir (local drive)
$redundantLocalNetwork = "R:\restics_backups_redundancy_rolling" # to dir (network mapped drive location)
$redundantAirGap = "S:\restic_backups_redundancy_rolling" # set backup usb to use S
$logGuideString = "Verb | Current Date and Time (Current Time Unix Seconds) | Start Date and Time (Start Time Unix Seconds) | Time Elapsed in Seconds | From Directory | To Directory | Job Name | Exit Status"
function appendToLog {
param([string]$verb="INFO", [string]$exitCode="NONE", [string]$log="$logFile", [string]$fromDir="NONE", [string]$toDir="NONE")
$timeCalc = $(Get-Date -uformat "%s")-$startUnixSeconds
# Verb | Current Date and Time (Current Time Unix Seconds) | Start Date and Time (Start Time Unix Seconds) | Time Elapsed in Seconds | From Directory | To Directory | Job Name | Exit Status
$logString = "$verb | $(Get-Date) ($(Get-Date -uformat "%s")) | $startDateHuman ($startUnixSeconds) | $timeCalc | $fromDir | $toDir | $jobName | $exitCode"
echo "$logString"
echo "$logString" >> "$log"
}
function appendToErrorLog {
param ( $exceptionMessage, $part )
$errorString = "`nFAIL on $part`nException: $exceptionMessage`nVars:`n`tstartDateHuman: $startDateHuman`n`tstart: $startUnixSecondsUnixSecons`n`tappendToErrorLog: $appendToErrorLog`n`tlogFile: $logFile`n`twarningFile: $warningFile`n`tresticRunning: $resticRunning`n`tredundantLocal: $redundantLocal`n`tredundantLocalNetwork: $redundantLocalNetwork`n`tjobName: $jobName"
echo "$errorString"
try { echo "$errorString" > "$warningFile" } catch { echo "Error: $warningFile Not Found" }
}
function doBackup {
param ( [string]$fromDir="NONE", [string]$toDir="NONE", [string]$tagString="INFO" )
echo "`n$tagString"
echo "`tFollow log with:`n`t`tGet-Content `"$logFile`" -Wait -Tail 10`n"
appendToLog -verb "START-$tagString" -log "$logFile" -toDir "$toDir" -fromDir "$fromDir"
robocopy "$fromDir" "$toDir" /E /Z /FP /NP /R:2 /W:1 /SAVE:"$jobString" /LOG+:"$logFile"
appendToLog -verb "FINISH-$tagString" -exitCode "$?" -log "$logFile" -toDir "$toDir" -fromDir "$fromDir"
}
echo "Initializing Logs"
touch "$runningFile"
echo "$logGuideString" > "$logFile"
appendToLog -verb "INITIALIZE-LOG-FILES" -exitCode "$?" -log "$logFile"
echo "`n$logGuideString`n"
# run da backupssss
doBackup -fromDir "$resticRunning" -toDir "$redundantLocal" -tagString "COPY-LOCAL" -jobString "$jobName" # local
appendToLog -verb "COPY-LOCAL" -exitCode "$?" -log "$logFile" -fromDir "$resticRunning" -toDir "$redundantLocal"
doBackup -fromDir "$resticRunning" -toDir "$redundantLocalNetwork" -tagString "COPY-LOCAL-NETWORK" -jobString "$jobName" # network
appendToLog -verb "COPY-LOCAL-NETWORK" -exitCode "$?" -log "$logFile" -fromDir "$resticRunning" -toDir "$redundantLocalNetwork"
doBackup -fromDir "$resticRunning" -toDir "$redundantAirGap" -tagString "COPY-AIRGAP" -jobString "$jobName" # airgap
appendToLog -verb "COPY-AIRGAP" -exitCode "$?" -log "$logFile" -fromDir "$resticRunning" -toDir "$redundantAirGap"
appendToLog -verb "DONE" -log "$logFile"
-11
View File
@@ -1,11 +0,0 @@
param(
[string]
$session = 'pi3'
)
while($True) {
ssh $session
echo "Waiting 5 Seconds..."
sleep 5
wait-on-host -hostname $session
}
View File
Whitespace-only changes.
View File
Whitespace-only changes.
@@ -1,58 +0,0 @@
#!/bin/bash
domain=kasm.h.acker.is
local_port=8443
swap_size_gib=6
sudo apt update
sudo apt dist-upgrade -y
sudo fallocate -l ${swap_size_gib}g /mnt/${swap_size_gib}GiB.swap
sudo chmod 600 /mnt/${swap_size_gib}GiB.swap
sudo mkswap /mnt/${swap_size_gib}GiB.swap
sudo swapon /mnt/${swap_size_gib}GiB.swap
echo "/mnt/${swap_size_gib}GiB.swap swap swap defaults 0 0" | sudo tee -a /etc/fstab
cd /tmp
curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.19.0-latest.tar.gz
tar -xf kasm_release*.tar.gz
sudo bash kasm_release/install.sh -L $local_port
sudo apt update
sudo apt install nginx certbot python3-certbot-nginx -y
sudo certbot certonly --nginx -d $domain
sudo cat << 'EOF' > /etc/nginx/sites-available/$domain
server {
listen 443 ssl;
server_name $domain;
ssl_certificate /etc/letsencrypt/live/$domain/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/$domain/privkey.pem;
location / {
# WebSocket Support
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Host and X headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Should match the listening port of this proxy
proxy_set_header X-Forwarded-Port 443;
# Connectivity Options
proxy_http_version 1.1;
proxy_read_timeout 1800s;
proxy_send_timeout 1800s;
proxy_connect_timeout 1800s;
proxy_buffering off;
# Allow large requests to support file uploads to sessions
client_max_body_size 10M;
# Proxy to Kasm Workspaces running locally on $local_port using ssl
proxy_pass https://127.0.0.1:$local_port;
}
}
EOF
sudo ln -s /etc/nginx/sites-available/$domain /etc/nginx/sites-enabled/$domain
sudo nginx -t
sudo systemctl restart nginx
sudo docker restart kasm_api
sudo shutdown -r +7
-49
View File
@@ -1,49 +0,0 @@
#!/bin/bash
if [ -z "$1" ]; then
echo "Showing Wifi Interfaces:"
iwconfig
echo "Please Enter Wifi Interface:"
read wifi_device
echo "Selected ${wifi_device}"
else
wifi_device="$1"
fi
# wifi_device=$1
echo 'Starting NetworkManager.service'
sudo systemctl restart NetworkManager
echo 'Restarting wpa_supplicant'
sudo systemctl restart wpa_supplicant
echo 'Disconnecting from wifi'
sudo nmcli d disconnect $wifi_device
echo 'Deleting all wifi saved networks'
nmcli connection show | sudo awk '{system("nmcli connection delete " $1)}'
echo 'Bringing down interface'
sudo ifconfig $wifi_device down
echo 'Bringing back up interface'
sudo ifconfig $wifi_device up
echo 'Reloading network manager'
sudo nmcli g reload
echo 'Turning off network manager'
sudo nmcli n off
echo 'Turning on network manager'
sudo nmcli n on
echo 'Changing interface mode to managed'
sudo iwconfig $wifi_device mode managed
echo 'Restarting networking stack'
sudo systemctl restart networking
iwconfig
echo -e "\nDone~ ^w^\n"
-250
View File
@@ -1,250 +0,0 @@
#!/bin/bash
# install without upfate and package install
## script=/tmp/install_script.sh && curl -s https://raw.githubusercontent.com/PrincessPi3/general-scripts-and-system-ssssssetup/refs/heads/main/customscripts/install_script.sh > $script && chmod +x $script && $SHELL -c "$script" && $SHELL /usr/share/customscripts/configure_webhook.sh full && exec $SHELL
# install with package install
## script=/tmp/install_script.sh && curl -s https://raw.githubusercontent.com/PrincessPi3/general-scripts-and-system-ssssssetup/refs/heads/main/customscripts/install_script.sh > $script && chmod +x $script && $SHELL -c "$script full" && $SHELL /usr/share/customscripts/configure_webhook.sh full && exec $SHELL
# set -e # make sure da silly thing dont continue when there be errorZ
# configs
gitRepo='https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup.git'
tmpDir='/tmp/generalssss'
tmp_customscripts_dir="$tmpDir/customscripts"
finalDir='/usr/share/customscripts'
packages="7zip apache2 argon2 avahi-daemon btop build-essential byobu cargo cifs-utils clamav cmake cowsay cracklib-runtime detox docker.io exiftool fdupes ffuf gcc-arm-none-eabi grc gzip iotop iptraf-ng jq kpartx libnss-mdns libnewlib-arm-none-eabi librust-git2+openssl-probe-dev libstdc++-arm-none-eabi-newlib locales lynx net-tools nginx openssl php polygen polygen-data procps python3 python3-scapy resolvconf restic ripgrep samba screen seclists snapd thefuck unzip wget xrdp xxd xz-utils zip kali-linux-default"
echo -e "\nSTARTING!\n\tUsing Shell $SHELL\n"
# ta get da right usermayhaps
if [[ -z $SUDO_USER ]]; then
echo -e "\nUsing User $USER\n"
username="$USER"
else
echo -n "\nUsing User $SUDO_USER\n"
username="$SUDO_USER"
fi
# home dir
userhome=/home/$username
# figure oot da sehell
# if [[ "$SHELL" =~ bash$ ]]; then
rcfile="$userhome/.bashrc"
# elif [[ "$SHELL" =~ zsh$ ]]; then
# rcfile="$userhome/.zshrc"
# else
# echo -e "Die: Unsupported Shell";
# exit 1
# fi
echo -e "\nusing rcfile $rcfile\n"
if [ ! -z "$1" ]; then
echo -e "\nFULL MODE SELECTED FULL UPGRADE AND INSTALL PACKAGES!\n"
# update and upgrade
echo -e "\nUpdating software lists\n"
sudo apt update
echo -e "\nDoin full-upgrade\n"
sudo apt full-upgrade -y
echo "installan packages"
echo -e "\nInstallan my packages\n"
sudo bash -c "apt install $packages -y"
# source $rcfile
# dotnet conditional install
# if [ ! $(which dotnet) ]; then
# echo -e "\ndotnet not found, installing\n"
# wget https://dot.net/v1/dotnet-install.sh -O /tmp/dotnet-install.sh
# chmod +x /tmp/dotnet-install.sh
# /tmp/dotnet-install.sh --channel STS # latest stable, optinoally LTS
# echo -e "## dotnet\nPATH=\$PATH:$userhome/.dotnet:$userhome/.dotnet/tools" >> $rcfile
# source $rcfile
# else
# echo -e "\ndotnet installed, skipping install of repo\n"
# source $rcfile
# fi
### dotnet
### haveibeenpwned-downloader
# if ! which haveibeenpwned-downloader; then
# echo -e "\nhaveibeenpwned-downloader not found, installing with dotnet\n"
# dotnet tool install --create-manifest-if-needed haveibeenpwned-downloader
# else
# echo -e "\nhaveibeenpwned-downloader installed, skipping install\n"
# fi
# homebrew
if [ ! $(which brew) ]; then
## install homebrew
echo -e "\nlinuxbrew not found, installing\n"
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
### add to rcfile
if ! grep -q 'linuxbrew' $rcfile; then
echo "adding linuxbrew to $rcfile"
echo "# linuxbrew (homebrew/brew)" >> $rcfile
echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> $rcfile
else
echo "linuxbrew already in $rcfile skipping"
fi
else
echo -e "\nlinuxbrew installed, skipping install\n"
fi
### install ponysay
if [ ! $(which ponysay) ]; then
echo -e "\nponysay not fonud, installiing\n"
brew install ponysay
if ! grep 'ponysay fix' $rcfile; then
echo "adding ponysay fix to $rcfile"
echo -e "# ponysay fix\nexport PYTHONWARNINGS=ignore::SyntaxWarning" >> $rcfile
source $rcfile
else
echo "ponysay fix already in $rcfile skipping"
source $rcfile
fi
else
echo -e "\nponysay already installed, skipping\n"
fi
# cargo
## oniux
echo -e "\nINSTALLIN TOR ONIUX\n"
if [ -f /usr/local/bin/oniux ]; then
echo -e "\nexisting oniux found, skipping\n"
else
echo -e "\nexisting oniux not found, installing\n"
cd /tmp && cargo install --git https://gitlab.torproject.org/tpo/core/oniux && cd - && echo -e '## Oniux/Cargo Shit\nPATH=$PATH:$HOME/.cargo/bin' >> ~/.bashrc && source ~/.bashrc && oniux curl https://canhazip.com
fi
else
echo -e "\nskipping package install\n"
fi
# get the existing tag and webhooks if any
if [ -f $finalDir/tag.txt ]; then
echo -e "\nFound existing tag.txt, backing up\n"
cp $finalDir/tag.txt /tmp/tag.txt
else
echo -e "\nno existing tag.txt, skipping backup of it\n"
fi
# backup webhook if present
if [ -f $finalDir/webhook.txt ]; then
echo -e "\nFound existing webhook.txt, backing up\n"
cp $finalDir/webhook.txt /tmp/webhook.txt
else
echo -e "\nno existing webhook.txt, skipping backup of it\n"
fi
# clean up any exisiting repo dir
if [[ -d "$tmpDir" ]]; then
echo "\nCleaning Up Existing $tmpDir\n"
rm -rf "$tmpDir"
else
echo -e "\n$tmpDir not found, skipping deleting it\n"
fi
# clean up any existing install
if [[ -d "$finalDir" ]]; then
echo -e "\nCleaning Up Existing $finalDir\n"
sudo rm -rf "$finalDir"
else
echo -e "\n$finalDir not found, will create\n"
fi
# ddownload repo
echo -e "\nCloning Repo $gitRepo\n"
git clone $gitRepo $tmpDir --single-branch --depth 1
# donut
echo -e "\nCompiling donut\n"
gcc -o "$tmp_customscripts_dir/donut" "$tmp_customscripts_dir/donut.c" -lm 2>/dev/null
# put the customscripts dir into place
echo -e "\nPlacing in $finalDir\n"
sudo mv "$tmp_customscripts_dir" "$finalDir"
# fix ownership
echo -e "\nChanging ownership of $finalDir and $userhome/Rice to $username:$username recursively\n"
sudo chown -R $username:$username "$finalDir"
sudo chown -R $username:$username $userhome/Rice
# fix perms
echo -e "\nSetting perms of $finalDir and contents to 775\n"
sudo chmod -R 775 "$finalDir"
# check if $finalDir is in $rcfile
grep -q $finalDir $rcfile
pathgrep=$?
if [ $pathgrep -eq 0 ]; then
echo -e "\n$finalDir Already in \$PATH Skipping Append\n"
fi
else
# echo -e "\nAdding $finalDir to $username's \$PATH by Appending to $rcfile\n"
# echo -e "\n\n# automatically added by customscripts installer\nexport PATH=\"\$PATH:$finalDir\"" >> "$rcfile"
fi
# install pishrink if not there
if [ ! -f /usr/local/bin/pishrink ]; then
echo -e "\npishrink not found, installing\n"
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
mv pishrink.sh pishrink
chmod +x pishrink
sudo mv pishrink /usr/local/bin
else
echo -e "\nPishrink already installed, skipping\n"
fi
# install ble.sh if not there
if [ ! -d $userhome/.local/share/blesh ]; then
# install ble.sh
echo -e "\nble.sh not found, installing\n"
cd /tmp
git clone --recursive --depth 1 --shallow-submodules --single-branch -b master https://github.com/akinomyoga/ble.sh.git
make -C ble.sh install PREFIX=~/.local
echo '# ble.sh' >> $rcfile
echo "source -- ~/.local/share/blesh/ble.sh" >> $rcfile
else
echo -e "\nble.sh already installed, skippping\n"
fi
$SHELL -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"' >> "$rcfile"
# appeend thefuck to rcfile if not present
grep -q thefuck $rcfile
thefuck_present=$?
if [ $thefuck_present -ne 0 ]; then
echo -e "\nthefuck alias not fonud in $rcfile, adding\n"
# echo -e "# thefuck\neval \$(thefuck --alias fuck)" >> $rcfile
# source $rcfile
else
echo -e "\nthefuck is already in $rcfile, skipping\n"
fi
# copy rice if not present
if [ ! -d $userhome/Rice ]; then
echo -e "\n$userhome/Rice not found, adding\n"
mv $tmpDir/Rice $userhome
else
echo -e "\nRice found not copying again\n"
fi
# cleanup
echo -e "\ncleaning up temp files\n"
## installer
sudo rm -f "$finalDir/install_script.sh"
rm /tmp/install_script.sh
## git repo
sudo rm -rf "$tmpDir"
## donut c file
rm -f "$tmp_customscripts_dir/donut.c"
if [ ! -z "$1" ]; then
echo -e "cleaning up apt"
sudo apt autoremove -y
# echo -e "\nrebooting in 3 minutes\n"
# sudo shutdown -r +3
fi
echo -e "\nDone with first stage\n"