install.sh added

master
RightToPrivacy 2022-11-18 23:53:28 -05:00
parent 55315a13ea
commit d6645aa281
2 changed files with 92 additions and 2 deletions

View File

@ -362,7 +362,7 @@ edit_boot () {
echo -e "${CYAN}COPYING THE ABOVE BACKUPS TO ORIGINAL LOCATION WILL REVERT TO PREVIOUS \$HOME BOOT...${ENDCOLOR}\n"
sleep 3
$editor /etc/fstab
echo -e "${CYAN}NOW OPENING /etc/crypttab IN${ENDCOLOR} ${RED}$editor${ENDCOLOR}${ENDCOLOR}\n" && sleep 1
echo -e "${CYAN}NOW OPENING /etc/crypttab IN${ENDCOLOR} ${RED}$editor${ENDCOLOR}\n" && sleep 1
$editor /etc/crypttab
echo -e "${GREEN}DONE.${ENDCOLOR}\n"
}
@ -386,7 +386,7 @@ revert_boot () {
sleep .5
echo =e "${CYAN}Previous fstab / crypttab backups moved into boot...${ENDCOLOR}\n" && sleep .5
echo -e "${GREEN}DONE.${ENDCOLOR}\n" && sleep .5
echo -e "${CYAN}IF "
fi
}
# MAIN MENU

90
install.sh Normal file
View File

@ -0,0 +1,90 @@
#!/bin/bash
#
# create encrypted sdcard /home dir's, + turn usbstick into their hardware key
#
# Problem? File an issue (Git)
#
# Question? Leave as a comment on one of the pages anywhere
# under 'MY LINKS' listed below:
#
# ***BACK UP FIRST IF YOU DON'T KNOW WHAT YOU ARE DOING ;)***
# -RTP
#
# Especially for Linux devices like Pinephone/Pinetab (should work for other systems as this uses underlying
# Linux infrastructure common to most distros). Back up recommended in case you mess up.
#
# * make_vol leaves original /home directory in case you want to switch back anytime,
# simply comment out the fstab/crypttab changes to revert back :)
#
# MY LINKS:
#
# WRITINGS/VIDEO:
# BLOG: https://www.buymeacoffee.com/politictech/posts
# BACKUP BLOG: https://politictech.wordpress.com
#
# VIDEOS:
# PEERTUBE CHANNEL: https://tube.tchncs.de/video-channels/privacy__tech_tips/videos
# ODYSEE CHANNEL: https://odysee.com/@RTP
#
#
# SUPPORT CONTENT/DONATIONS:
#
# BMAC: https://www.buymeacoffee.com/politictech
# CASHAPP: https://cash.app/$HumanRightsTech
# MONERO:48qtspi5En44mJZLeiMoHYFEmuJfQYb5DLQxLDr7d1NXc53XaAvoT8PS3wBrhEc3VY1wxu5Rgw6oKBYgahpSAYnpHntbQNM
#
#
# VARIABLES
# * Device locations will be set during running (added this in)
sddev='mmcblk0' # *prompt will fill these in for you*
#disklocation='/dev/'$sddev # SDCARD (for keyfile)! - created in set_vars function
username='user' # user directory/name
# crypt_type="vcrypt" # luks (most kernels)
overwrite='/dev/urandom' # overwrite data
usbmount='/mnt/usb' # keyfile location
cryptmount='/mnt/home' # mount location for unlocked disk
fstype='f2fs' # Your choice: ext4, f2fs filesystem (f2fs can be faster on flash)
usbdisk='/dev/sda' # Your usb disk location (use lsblk)
cipher='aes-xts-plain64' # aes, twofish, etc (make sure your kernel supports it)
editor='nano -l ' # change this to your preferred editor command (ie: vim)
# not forcing anyone to use vim unless they like to. :-P
# COLORS
export CYAN='\033[1;36m'
export GREEN='\033[1;92m'
export RED='\033[1;91m'
export WHITE='\033[1;37m'
export ENDCOLOR='\033[1;00m'
# PROMPT COLOR
red=$'\e[31m';
grey=$'\e[37m';
purple=$'\e[38;5;0;1;48;5;92m';
nexc=$'\e[33m';
nocolor=$'\e[0m';
# ENSURING ROOT PRIV
if [ $EUID == 0 ]; then
echo -e "${CYAN}Required privileges ${RED}confirmed. ${CYAN}Continuing...${ENDCOLOR}"
else
echo -e "${RED}sudo ${CYAN}or ${RED}root ${CYAN}required. Exiting.${ENDCOLOR}"
exit;
fi
echo -e "${CYAN}Installing crypto_homes command...${ENDCOLOR}\n"
cp crypthome.sh /usr/bin/crypto_homes || {
echo -e "${RED}ERROR: CANNOT COPY ${CYAN}crypthome.sh CHECK PATH${ENDCOLOR}\n"
}
chmod +x /usr/bin/crypto_homes && {
echo -e "${GREEN}DONE.${ENDCOLOR}\n"
}
echo -e "${CYAN}Run ${GREEN}sudo crypto_homes ${CYAN}command to begin using crypto_homes${ENDCOLOR}\n"