UpFast/install.sh

33 lines
640 B
Bash
Raw Normal View History

#!/bin/sh
# quick install (and run) script for upfast using systemd
2023-04-05 14:10:59 +02:00
if [ "$(id -u)" -ne 0 ]
then
echo "Please run as root"
exit 1
fi
2023-04-05 14:15:54 +02:00
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
2023-04-05 14:15:54 +02:00
git clone https://code.cronyakatsuki.xyz/tlast/upfast . ||
exit 1
python3 -m venv env
2023-04-05 14:15:54 +02:00
. ./env/bin/activate ||
exit1
pip install -r requirements.txt ||
exit 1
mkdir upload' ||
exit 1
2023-04-05 12:48:30 +02:00
cp ./upfast.service /etc/systemd/system/upfast.service
2023-04-05 13:05:34 +02:00
systemctl daemon-reload