#!/bin/sh # quick install (and run) script for upfast using systemd if [ "$(id -u)" -ne 0 ] then echo "Please run as root" exit 1 fi UFDIR=${1:=/srv/upfast} USER=${1:=upfast} useradd --shell /bin/sh --system --home-dir $UFDIR $UFUSER || exit 1 mkdir -p "$UFDIR" || # dodge copying of skeletons exit 1 chown "$UFUSER:$UFUSER" "$UFDIR" chmod 700 "$UFDIR" su "$UFUSER" -c" cd git clone https://code.cronyakatsuki.xyz/tlast/upfast . || exit 1 python3 -m venv env . ./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