-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathtinyllm
executable file
·58 lines (49 loc) · 868 Bytes
/
tinyllm
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
52
53
54
55
56
57
58
#!/bin/bash
SERVICE_NAME="tinyllm"
start_service() {
sudo systemctl start "$SERVICE_NAME"
}
stop_service() {
sudo systemctl stop "$SERVICE_NAME"
}
enable_service() {
sudo systemctl enable "$SERVICE_NAME"
}
disable_service() {
sudo systemctl disable "$SERVICE_NAME"
}
check_status() {
sudo systemctl status "$SERVICE_NAME"
}
view_logs() {
sudo journalctl -u "$SERVICE_NAME"
}
case "$1" in
start)
start_service
;;
stop)
stop_service
;;
restart)
stop_service
start_service
;;
enable)
enable_service
;;
disable)
disable_service
;;
status)
check_status
;;
logs)
view_logs
;;
*)
echo "Usage: $0 {start|stop|restart|enable|disable|status|logs}"
exit 1
;;
esac
exit 0