-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
90 lines (78 loc) · 2.2 KB
/
Makefile
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#
# written by @author ZyzonixDev
# published by ZyzonixDevelopments
# -
# date | 13/04/2021
# type | Makefile
# -
# file | Makefile
# project | MontSy
# version | 0.9.6
#
# executing the setup
all: help
# setting up (ignore errors)
setup:
make -i setup_i
# setting up (starting shell script)
setup_i:
@echo "---------------------"
@echo starting MontSy setup
@echo started setup
@echo "---------------------"
sudo chmod +x static/setup.sh
sudo chmod +x static/view_status.sh
sudo ./static/setup.sh
# removing all entries / files / folders
uninstall:
@echo ""
@echo "uninstalling MontSy"
@echo ""
make stop
make disable
sudo rm /lib/systemd/system/montsy.service
sudo rm -rf $(CURDIR)
sudo rm -rf $(CURDIR)_OUTPUT
# starting systemd-service
start:
@echo "starting system service"
@echo
sudo systemctl start montsy.service
# stopping systemd-service
stop:
@echo "stopping system service"
@echo ""
sudo systemctl stop montsy.service
# installing service
enable:
@echo "installing system service"
@echo ""
sudo systemctl enable montsy.service
# uninstalling service
disable:
@echo "uninstalling system service"
@echo ""
sudo systemctl disable montsy.service
status: check
# check status of service
check:
@echo "checking status"
@echo ""
@echo "the following error is due to the command - don't worry"
@echo ""
sudo ./static/view_status.sh
# printing all commands of this file
help:
@echo ""
@echo "------------------------- [MontSy - Installation - HELP] -------------------------"
@echo "--> some commands must be run as ROOT (with root privilegs (sudo))"
@echo ""
@echo "- sudo make setup..................starts the setup script"
@echo "- sudo make uninstall..............removes the software from this device"
@echo "- sudo make start..................starts the system service"
@echo "- sudo make stop...................stops the system service"
@echo "- sudo make enable.................installs the system service"
@echo "- sudo make disable................uninstalls the system service"
@echo "- make check.......................shows the status of the MontSy system service"
@echo "----------------------------------------------------------------------------------"
@echo ""