1
0
forked from crony/UpFast

Compare commits

..

3 Commits

Author SHA1 Message Date
root
c3f133b211 Merge branch 'installation-fix' into mine 2023-04-05 14:16:17 +02:00
root
4d3cac8851 added error detection 2023-04-05 14:15:54 +02:00
root
574b7ce5f1 use id command instead of variable 2023-04-05 14:10:59 +02:00

View File

@ -1,26 +1,32 @@
#!/bin/sh
# quick install (and run) script for upfast using systemd
if [ $EUID -ne 0]
if [ "$(id -u)" -ne 0 ]
then
echo "Please run as root"
exit 1
fi
useradd --shell /bin/sh --system --home-dir /usr/local/upfast upfast
mkdir -p /usr/local/upfast # dodge copying of skeletons
useradd --shell /bin/sh --system --home-dir /usr/local/upfast upfast ||
exit 1
mkdir -p /usr/local/upfast || # dodge copying of skeletons
exit 1
chown upfast:upfast /usr/local/upfast
chmod 700 /usr/local/upfast
su upfast -c'
cd
git clone https://code.cronyakatsuki.xyz/crony/upfast .
git clone https://code.cronyakatsuki.xyz/tlast/upfast . ||
exit 1
python3 -m venv env
. ./env/bin/activate
pip install -r requirements.txt
mkdir upload'
. ./env/bin/activate ||
exit1
pip install -r requirements.txt ||
exit 1
mkdir upload' ||
exit 1
cp ./upfast.service /etc/systemd/system/upfast.service
systemctl daemon-reload