forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrestart.sh
More file actions
39 lines (36 loc) · 1.03 KB
/
Copy pathrestart.sh
File metadata and controls
39 lines (36 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# Rebuild users and domains
for user in `ls /usr/local/hestia/data/users/`; do
echo "(*) Rebuilding domains and account for user: $user..."
if [ ! -z $WEB_SYSTEM ]; then
$BIN/v-rebuild-web-domains $user >/dev/null 2>&1
fi
if [ ! -z $DNS_SYSTEM ]; then
$BIN/v-rebuild-dns-domains $user >/dev/null 2>&1
fi
if [ ! -z $MAIL_SYSTEM ]; then
$BIN/v-rebuild-mail-domains $user >/dev/null 2>&1
fi
done
echo "(*) Restarting services..."
if [ ! -z $MAIL_SYSTEM ]; then
$BIN/v-restart-mail $restart
fi
if [ ! -z $IMAP_SYSTEM ]; then
$BIN/v-restart-service $IMAP_SYSTEM $restart
fi
if [ ! -z $WEB_SYSTEM ]; then
$BIN/v-restart-web $restart
$BIN/v-restart-proxy $restart
fi
if [ ! -z $DNS_SYSTEM ]; then
$BIN/v-restart-dns $restart
fi
for v in `ls /etc/php/`; do
if [ -e /etc/php/$v/fpm ]; then
$BIN/v-restart-service php$v-fpm $restart
fi
done
# Restart SSH daemon and Hestia Control Panel service
$BIN/v-restart-service ssh $restart
$BIN/v-restart-service hestia $restart