File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -381,19 +381,20 @@ install_executable() {
381381
382382# remove previous installation of cron jobs and SystemGuard
383383remove_previous_installation () {
384- log " Removing previous installation of $APP_NAME , if any..."
385384 if [ -d " $EXTRACT_DIR " ]; then
386385 rm -rf " $EXTRACT_DIR "
387386 log " Old installation removed."
387+ else
388+ log " No previous installation found."
388389 fi
389390
390- log " Cleaning up previous cron jobs related to $APP_NAME ..."
391391 if $crontab_cmd -l | grep -q " $CRON_PATTERN " ; then
392392 $crontab_cmd -l | grep -v " $CRON_PATTERN " | $crontab_cmd -
393393 log " Old cron jobs removed."
394394 else
395395 log " No previous cron jobs found."
396396 fi
397+
397398}
398399
399400# Function to fetch the latest version of SystemGuard from GitHub releases
Original file line number Diff line number Diff line change 22from logging .handlers import RotatingFileHandler
33import os
44
5-
5+ ROOT_DIR = os . path . dirname ( os . path . abspath ( __file__ ))
66# Create a logs directory if it doesn't exist
7- os .makedirs ('logs' , exist_ok = True )
7+ os .makedirs (os . path . join ( ROOT_DIR , 'logs' ) , exist_ok = True )
88
99# Log Formatter with datetime, log level, and message
1010formatter = logging .Formatter (
You can’t perform that action at this time.
0 commit comments