|
|
@@ -1,23 +1,35 @@
|
|
|
#!/bin/bash
|
|
|
-# Internal vesta function
|
|
|
-# cron system restart
|
|
|
+# info: restart cron service
|
|
|
+# arguments: none
|
|
|
+#
|
|
|
+# The function tells crond service to reread its configuration files.
|
|
|
+
|
|
|
+
|
|
|
+#----------------------------------------------------------#
|
|
|
+# Variable&Function #
|
|
|
+#----------------------------------------------------------#
|
|
|
|
|
|
# Importing variables
|
|
|
source $VESTA/conf/vars.conf
|
|
|
source $V_CONF/vesta.conf
|
|
|
|
|
|
-crond() {
|
|
|
- /etc/init.d/crond 'reload' >/dev/null 2>&1
|
|
|
- if [ $? -ne 0 ]; then
|
|
|
- #$V_FUNC/report_issue 'sys' 'cron'
|
|
|
- echo "$E_RESTART_FAILED $V_EVENT"
|
|
|
- fi
|
|
|
-}
|
|
|
+
|
|
|
+#----------------------------------------------------------#
|
|
|
+# Action #
|
|
|
+#----------------------------------------------------------#
|
|
|
|
|
|
# Parsing config / or just source config
|
|
|
if [ "$CRON_SYSTEM" = 'crond' ]; then
|
|
|
- crond
|
|
|
+ /etc/init.d/crond 'reload' >/dev/null 2>&1
|
|
|
+ if [ $? -ne 0 ]; then
|
|
|
+ echo "$E_PARSING $V_EVENT"
|
|
|
+ exit $E_PARSING
|
|
|
+ fi
|
|
|
fi
|
|
|
|
|
|
-# Logging
|
|
|
+
|
|
|
+#----------------------------------------------------------#
|
|
|
+# Vesta #
|
|
|
+#----------------------------------------------------------#
|
|
|
+
|
|
|
exit
|