-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·29 lines (22 loc) · 937 Bytes
/
install
File metadata and controls
executable file
·29 lines (22 loc) · 937 Bytes
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
#!/usr/bin/env bash
# SPDX-License-Identifier: MIT
#
# Copyright (c) 2022 QuickVM, LLC <contact@quickvm.com> All Rights Reserved.
set -e
[[ $UID == 0 ]] || { echo "Please run this as root!"; exit 1; }
: ${UNIT_FILES:=./units}
: ${BIN_DIR:=/usr/local/bin}
: ${UNIT_DIR:=/etc/systemd/system}
[[ -d ${UNIT_FILES} ]] || { echo "The ${UNIT_FILES} directory cannot be found! Please run this from the repo root directory!"; exit 1; }
install bin/blazon ${BIN_DIR}
install -m 0644 units/blazon@.service ${UNIT_DIR}
systemctl daemon-reload
echo ""
echo "Great job! Blazon is now installed!"
echo ""
echo "If you want to uninstall Blazon please manually run these commands as the root user:"
echo "sudo systemctl disable blazon@yourservices.service (replace yourservice with whatever service you set this up with)"
echo "sudo rm -f ${BIN_DIR}/blazon"
echo "sudo rm -f ${UNIT_DIR}/blazon.service"
echo "sudo systemctl daemon-reload"
echo ""