-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure_amity
executable file
·51 lines (32 loc) · 1.06 KB
/
configure_amity
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
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
NAME=amity
ACTION=$1
if [ "$ACTION" = "" ]; then
echo "Available commands are enable, disable, restart, status"
fi
if [ "$ACTION" = "enable" ]; then
systemctl --user start "$NAME-hub"
systemctl --user enable "$NAME-hub"
systemctl --user start "$NAME-management"
systemctl --user enable "$NAME-management"
systemctl --user start "$NAME-redirect"
systemctl --user enable "$NAME-redirect"
fi
if [ "$ACTION" = "disable" ]; then
systemctl --user stop "$NAME-hub"
systemctl --user disable "$NAME-hub"
systemctl --user stop "$NAME-management"
systemctl --user disable "$NAME-management"
systemctl --user stop "$NAME-redirect"
systemctl --user disable "$NAME-redirect"
fi
if [ "$ACTION" = "restart" ]; then
systemctl --user restart "$NAME-hub"
systemctl --user restart "$NAME-management"
systemctl --user restart "$NAME-redirect"
fi
if [ "$ACTION" = "status" ]; then
systemctl --user status "$NAME-hub"
systemctl --user status "$NAME-management"
systemctl --user status "$NAME-redirect"
fi