diff options
| author | user <user@node5.net> | 2024-01-02 05:16:27 +0100 |
|---|---|---|
| committer | user <user@node5.net> | 2024-01-02 05:16:27 +0100 |
| commit | 937a5571a158115060f062b066543132d8c66752 (patch) | |
| tree | 9ade99f4118dab905197d467b82796beaf44b6c8 /Makefile | |
initial commit. Ping and http status works + state change
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..732f06a --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +.PHONY : add_user install_dependencies unit_files setup + +add_user: + sudo useradd server_status -d /opt/server_status -s /bin/bash + +copy_software: + sudo cp -r ./* /opt/server_status + +install_dependencies: + sudo apt install -y python3 python3-pip + sudo -u server_status python3 -m venv venv + sudo -u server_status venv/bin/pip install -r requirements.txt + +unit_files: + sudo ln -s /opt/server_status/unit_files/server-status.service /etc/systemd/system/server-status.service + sudo ln -s /opt/server_status/unit_files/check-server-status.service /etc/systemd/system/check-server-status.service + sudo ln -s /opt/server_status/unit_files/check-server-status.timer /etc/systemd/system/check-server-status.timer + sudo systemctl daemon-reload + sudo systemctl enable --now server-status + sudo systemctl enable --now check-server-status + +setup: add_user install_dependencies unit_files |
