feat(install.sh): dependancies finder

This commit is contained in:
2025-06-19 22:32:20 +02:00
parent 4856b90ee1
commit ef4b24a200
4 changed files with 98 additions and 60 deletions

View File

@@ -2,7 +2,7 @@
source /etc/serverconfig/.env
DIR="$(cd "$(dirname "$0")" && pwd)"
DIR="$(cd "$(dirname "$0")" && pwd)"
BACKUP="$DIR/aws-bakup.bak"
LOG="/var/log/aws-bak.log"

View File

@@ -13,5 +13,5 @@ datetime_print() {
local level="${2:-INFO}"
local timestamp="[$(date +"$DATETIME_FORMAT")]"
echo "$timestamp - $level: $message" | tee -a "$LOG"
echo -e "$timestamp - $level: $message" | tee -a "$LOG"
}

View File

@@ -2,6 +2,24 @@
source /usr/local/bin/notifications.sh
# initialize_config() {
# local isInstalling="$1"
# local target_file="$2"
# local crontab_configuration="$3"
# local link_path="$4"
# if [[ $isInstalling != "--install" ]]; then
# return;
# fi
# echo "$crontab_configuration $0" | crontab -
# }
# install_para="$1"
# if [[ $install_para == "--install" ]]; then
# fi
case "$PAM_TYPE" in
open_session)
PAYLOAD=" { \"text\": \"$PAM_USER logged in (remote host: $PAM_RHOST) at $(date).\" }"