From 3c3f05d14bb614c962ae8f10e1e12b44b0917680 Mon Sep 17 00:00:00 2001 From: CronyAkatsuki Date: Thu, 15 Jun 2023 09:25:58 +0200 Subject: [PATCH] Fix installation script. --- install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 8dd5660..5706579 100755 --- a/install.sh +++ b/install.sh @@ -1,11 +1,11 @@ -#!/bin/sh +#!/bin/bash # quick install (and run) script for upfast using systemd -if [ $EUID -ne 0] -then - echo "Please run as root" - exit 1 -fi + +# Check if script is run by root +[ $EUID -ne 0 ] && printf '%s\n' "Please run as root" && exit 1 + +apt-get install python3-pip useradd --shell /bin/sh --system --home-dir /usr/local/upfast upfast mkdir -p /usr/local/upfast # dodge copying of skeletons @@ -22,5 +22,5 @@ python3 -m venv env pip install -r requirements.txt mkdir upload' -cp ./upfast.service /etc/systemd/system/upfast.service +cp /usr/local/upfast/upfast.service /etc/systemd/system/upfast.service systemctl daemon-reload