File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # info: delete exim mail queue
3+ # options: none
4+ # labels: hestia
5+ #
6+ # example: v-delete-sys-mail-queue
7+ #
8+ # This function checks for messages stuck in the exim mail queue
9+ # and prompts the user to clear the queue if desired.
10+
11+ # ----------------------------------------------------------#
12+ # Variable&Function #
13+ # ----------------------------------------------------------#
14+
15+ # Includes
16+ # shellcheck source=/usr/local/hestia/func/main.sh
17+ source $HESTIA /func/main.sh
18+ # shellcheck source=/usr/local/hestia/conf/hestia.conf
19+ source $HESTIA /conf/hestia.conf
20+
21+
22+ # Perform verification if read-only mode is enabled
23+ check_hestia_demo_mode
24+
25+ message_count=$( exim -bpc)
26+ # ----------------------------------------------------------#
27+ # Action #
28+ # ----------------------------------------------------------#
29+
30+ if [ " $message_count " -gt 0 ]; then
31+ read -p " Are you sure you want to delete $message_count messages from the exim queue? [y/N] " answer
32+
33+ if [ " $answer " = " y" ] || [ " $answer " = " Y" ]; then
34+ exiqgrep -i | xargs exim -Mrm
35+ fi
36+ fi
37+ # ----------------------------------------------------------#
38+ # Hestia #
39+ # ----------------------------------------------------------#
40+ $BIN /v-log-action " system" " Info" " System" " Package copied (Package: $package , New Package: $new_package )."
41+ log_event " $OK " " $ARGUMENTS "
42+
43+ exit
You can’t perform that action at this time.
0 commit comments