File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # info: update mail templates
3+ # options: [RESTART]
4+ #
5+ # The function for obtaining updated pack of mail templates.
6+
7+
8+ # ----------------------------------------------------------#
9+ # Variable&Function #
10+ # ----------------------------------------------------------#
11+
12+ # Argument definition
13+ restart=$1
14+
15+ # Includes
16+ source $HESTIA /func/main.sh
17+ source $HESTIA /conf/hestia.conf
18+
19+ # Detect OS
20+ case $( head -n1 /etc/issue | cut -f 1 -d ' ' ) in
21+ Debian) type=" debian" ;;
22+ Ubuntu) type=" ubuntu" ;;
23+ * ) type=" NoSupport" ;;
24+ esac
25+
26+ # Detect version
27+ if [ " $type " = " ubuntu" ] || [ " $type " = " debian" ]; then
28+ type=" deb"
29+ else
30+ echo " Error: can't detect supported os"
31+ log_event " $E_NOTEXIST "
32+ exit $E_NOTEXIST
33+ fi
34+
35+
36+ # ----------------------------------------------------------#
37+ # Action #
38+ # ----------------------------------------------------------#
39+
40+ # Update templates
41+ cp -rf $HESTIA /install/$type /templates/mail $HESTIA /data/templates/
42+
43+ # ----------------------------------------------------------#
44+ # Hestia #
45+ # ----------------------------------------------------------#
46+
47+ # Restarting web server
48+ $BIN /v-restart-web $restart
49+ check_result $? " restart" > /dev/null 2>&1
50+
51+ $BIN /v-restart-proxy $restart
52+ check_result $? " restart" > /dev/null 2>&1
53+
54+ $BIN /v-restart-proxy $restart
55+ check_result $? " restart" > /dev/null 2>&1
56+
57+ exit
You can’t perform that action at this time.
0 commit comments