-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathv.sh
42 lines (33 loc) · 894 Bytes
/
v.sh
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
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 start/stop/restart/down/up/isolate/use/share/secure"
exit 1
fi
if [ $1 != "start" ] && [ $1 != "stop" ] && [ $1 != "restart" ] && [ $1 != "use" ] && [ $1 != "down" ] && [ $1 != "up" ] && [ $1 != "isolate" ] && [ $1 != "use" ] && [ $1 != "share" ] && [ $1 != "secure" ]; then
echo "Usage: $0 start/stop/restart/down/up/isolate/use/share/secure"
exit 1
fi
if [ $1 = "start" ] || [ $1 = "up" ]; then
valet start
fi
if [ $1 = "stop" ] || [ $1 = "down" ]; then
valet stop && valet stop dnsmasq
fi
if [ $1 = "restart" ]; then
valet restart
fi
if [ $1 = "use" ]; then
valet use $2 && composer global update
fi
if [ $1 = "isolate" ]; then
valet isolate $2
fi
if [ $1 = "unisolate" ]; then
valet unisolate
fi
if [ $1 = "share" ]; then
valet share
fi
if [ $1 = "secure" ]; then
valet secure
fi