mirror of
https://forge.chapril.org/tykayn/workflow
synced 2025-10-09 17:02:47 +02:00
up ckeck installed
This commit is contained in:
parent
3942a254b6
commit
cb1e4934b5
5 changed files with 90 additions and 284 deletions
73
initialization/check_installed.sh
Executable file
73
initialization/check_installed.sh
Executable file
|
@ -0,0 +1,73 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "========== Checking installed programs and files ======="
|
||||
source $HOME/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh
|
||||
|
||||
# Check if apt-installed packages are present
|
||||
echo "Checking apt-installed packages..."
|
||||
PACKAGES="adduser ansible arp-scan automysqlbackup borgbackup calibre certbot curl docker docker-compose etckeeper eza fail2ban geeqie git gnupg htop jq meld nano ncdu nginx npm pandoc php-curl php-mysql php-xml php8.4 php8.4-fpm php8.4-xml python3 python3-pip python3-setuptools rbenv restic rsync smartmontools snapd sshfs syncthing testdisk texlive tig unattended-upgrades vrms zsh"
|
||||
|
||||
MISSING_PACKAGES=""
|
||||
for pkg in $PACKAGES; do
|
||||
if ! dpkg -l | grep -q " $pkg "; then
|
||||
MISSING_PACKAGES="$MISSING_PACKAGES $pkg"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$MISSING_PACKAGES" ]; then
|
||||
echo -e "\e[31mThe following packages are missing:$MISSING_PACKAGES\e[0m"
|
||||
else
|
||||
echo "All apt packages are installed."
|
||||
fi
|
||||
|
||||
# Check if snap-installed packages are present
|
||||
echo "Checking snap-installed packages..."
|
||||
SNAP_PACKAGES="btop emacs"
|
||||
|
||||
MISSING_SNAP_PACKAGES=""
|
||||
for pkg in $SNAP_PACKAGES; do
|
||||
if ! snap list | grep -q "$pkg"; then
|
||||
MISSING_SNAP_PACKAGES="$MISSING_SNAP_PACKAGES $pkg"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$MISSING_SNAP_PACKAGES" ]; then
|
||||
echo -e "\e[31mThe following snap packages are missing:$MISSING_SNAP_PACKAGES\e[0m"
|
||||
else
|
||||
echo "All snap packages are installed."
|
||||
fi
|
||||
|
||||
cd $WORKFLOW_PATH_PUBLIC/bin
|
||||
# Check if AppImages are present
|
||||
echo "Checking AppImages..."
|
||||
if [ ! -f "$WORKFLOW_PATH_PUBLIC/bin/Nextcloud-3.16.6-x86_64.AppImage" ]; then
|
||||
echo -e "\e[31m Nextcloud AppImage is missing.\e[0m"
|
||||
fi
|
||||
|
||||
if [ ! -f "$WORKFLOW_PATH_PUBLIC/bin/VeraCrypt-1.26.24-x86_64.AppImage" ]; then
|
||||
echo -e "\e[31m VeraCrypt AppImage is missing.\e[0m"
|
||||
fi
|
||||
|
||||
if [ ! -f "$HOME/Nextcloud/ressources/workflow_nextcloud/secrets_vars.sh" ]; then
|
||||
echo -e "\e[31m secret vars file is missing. $HOME/Nextcloud/ressources/workflow_nextcloud/secrets_vars.sh \e[0m"
|
||||
fi
|
||||
|
||||
# Check if configuration files are present in home directory
|
||||
echo "Checking configuration files in home directory..."
|
||||
# Note: .bash_custom_aliases is downloaded as .bash_aliases in fast.sh
|
||||
CONFIG_FILES=".bash_aliases .bashrc .zshrc"
|
||||
|
||||
MISSING_CONFIG_FILES=""
|
||||
for file in $CONFIG_FILES; do
|
||||
if [ ! -f "$HOME/$file" ]; then
|
||||
MISSING_CONFIG_FILES="$MISSING_CONFIG_FILES $file"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$MISSING_CONFIG_FILES" ]; then
|
||||
echo -e "\e[31mThe following configuration files are missing in your home directory:$MISSING_CONFIG_FILES\e[0m"
|
||||
else
|
||||
echo "All configuration files are present in your home directory."
|
||||
fi
|
||||
|
||||
echo "========== Check completed ======="
|
Loading…
Add table
Add a link
Reference in a new issue