Update install.sh
This commit is contained in:
1 parent
12a92e53a1
commit
2339c443ac
1 file changed
+5
-5
+5
-5
@@ -4,17 +4,17 @@ set -euo pipefail
|
||||
BIN_DIR="/usr/local/bin"
|
||||
SYSTEMD_DIR="/etc/systemd/system"
|
||||
|
||||
SCRIPT_NAME="src/killsw"
|
||||
TARGET_NAME="src/killswitch.target"
|
||||
SCRIPT_NAME="killsw"
|
||||
TARGET_NAME="killswitch.target"
|
||||
SRC_DIR="src" # relative to repo root
|
||||
|
||||
# assume running from repo root
|
||||
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# install binary
|
||||
install -m 755 "$REPO_DIR/$SCRIPT_NAME" "$BIN_DIR/$SCRIPT_NAME"
|
||||
install -m 755 "$REPO_DIR/$SRC_DIR/$SCRIPT_NAME" "$BIN_DIR/$SCRIPT_NAME"
|
||||
|
||||
# install systemd target
|
||||
install -m 644 "$REPO_DIR/$TARGET_NAME" "$SYSTEMD_DIR/$TARGET_NAME"
|
||||
install -m 644 "$REPO_DIR/$SRC_DIR/$TARGET_NAME" "$SYSTEMD_DIR/$TARGET_NAME"
|
||||
|
||||
# reload systemd daemon
|
||||
systemctl daemon-reload
|
||||
|
||||
Reference in new issue
Block a user