2023-06-15 09:25:58 +02:00
|
|
|
#!/bin/bash
|
2023-04-04 18:47:37 +02:00
|
|
|
|
|
|
|
# quick install (and run) script for upfast using systemd
|
2023-06-15 09:25:58 +02:00
|
|
|
|
|
|
|
# Check if script is run by root
|
|
|
|
[ $EUID -ne 0 ] && printf '%s\n' "Please run as root" && exit 1
|
|
|
|
|
|
|
|
apt-get install python3-pip
|
2023-04-04 18:47:37 +02:00
|
|
|
|
|
|
|
useradd --shell /bin/sh --system --home-dir /usr/local/upfast upfast
|
|
|
|
mkdir -p /usr/local/upfast # dodge copying of skeletons
|
|
|
|
|
|
|
|
chown upfast:upfast /usr/local/upfast
|
|
|
|
chmod 700 /usr/local/upfast
|
|
|
|
|
|
|
|
su upfast -c'
|
|
|
|
cd
|
2023-04-05 13:04:05 +02:00
|
|
|
git clone https://code.cronyakatsuki.xyz/crony/upfast .
|
2023-04-04 18:47:37 +02:00
|
|
|
|
|
|
|
python3 -m venv env
|
|
|
|
. ./env/bin/activate
|
|
|
|
pip install -r requirements.txt
|
|
|
|
mkdir upload'
|
|
|
|
|
2023-06-15 09:25:58 +02:00
|
|
|
cp /usr/local/upfast/upfast.service /etc/systemd/system/upfast.service
|
2023-04-05 13:05:34 +02:00
|
|
|
systemctl daemon-reload
|