Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a4d9291ee3 | ||
|
129101ac2e | ||
|
c3f133b211 | ||
|
4d3cac8851 | ||
|
574b7ce5f1 | ||
|
3873729ae7 | ||
|
4342fa4a56 | ||
|
aa1dff7015 | ||
|
69f19a1888 | ||
|
a5df50f43c | ||
|
9f8afe5054 | ||
|
edc99c3481 | ||
|
8fdc68b441 | ||
dcda0f372a | |||
09d2c4f863 | |||
9abd361c7f |
11
README.md
11
README.md
@ -24,6 +24,13 @@ systemctl start upfast.service
|
||||
```bash
|
||||
systemctl enable upfast.service
|
||||
```
|
||||
|
||||
#### Updating
|
||||
To update, you only need to pull the changes
|
||||
```bash
|
||||
su upfast -c 'cd && git pull --no-rebase'
|
||||
```
|
||||
|
||||
### Docker
|
||||
|
||||
In the repo there is an included dockerfile to generate an image from the latest version of everything, to generate an image just run `docker build . -t upfast` (You need root privileges or to be in the docker group).
|
||||
@ -49,3 +56,7 @@ ln -sf /etc/nginx/sites-available/upfast /etc/nginx/sites-enabled/
|
||||
```bash
|
||||
systemctl reload nginx
|
||||
```
|
||||
|
||||
# Contributions
|
||||
|
||||
Thanks [TLasT](https://craftmenners.men) on his help with testing and documentation.
|
||||
|
33
install.sh
33
install.sh
@ -1,26 +1,39 @@
|
||||
#!/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
|
||||
SIZE="5G"
|
||||
|
||||
useradd --shell /bin/sh --system --home-dir /usr/local/upfast upfast
|
||||
mkdir -p /usr/local/upfast # dodge copying of skeletons
|
||||
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 upfast:upfast /usr/local/upfast
|
||||
chmod 700 /usr/local/upfast
|
||||
chown "$UFUSER:$UFUSER" "$UFDIR"
|
||||
chmod 700 "$UFDIR"
|
||||
|
||||
su upfast -c'
|
||||
su "$UFUSER" -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
|
||||
|
||||
fallocate -l $SIZE storage
|
||||
mkfs.ext4 storage
|
||||
mount storage upload
|
||||
rm -fd /storage/*" ||
|
||||
exit 1
|
||||
|
||||
cp ./upfast.service /etc/systemd/system/upfast.service
|
||||
systemctl daemon-reload
|
||||
|
@ -5,8 +5,7 @@ html {
|
||||
body {
|
||||
max-width: 900px;
|
||||
margin: auto;
|
||||
background: #303446;
|
||||
color: #c6d0f5;
|
||||
background: #81a1c1;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@ -16,7 +15,7 @@ h1 {
|
||||
|
||||
hr {
|
||||
margin: 40px;
|
||||
color: #626880;
|
||||
color: #2e3440;
|
||||
}
|
||||
|
||||
img {
|
||||
@ -34,9 +33,9 @@ video {
|
||||
}
|
||||
|
||||
a {
|
||||
color: #f2d5cf;
|
||||
color: #ebcb8b;
|
||||
text-decoration: none;
|
||||
font-style: bold;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
@ -45,7 +44,7 @@ a:hover {
|
||||
}
|
||||
|
||||
pre {
|
||||
background: #292c3c;
|
||||
background: #2e3440;
|
||||
font-size: 1am;
|
||||
padding: 10px;
|
||||
max-width: 800;
|
||||
@ -54,6 +53,7 @@ pre {
|
||||
overflow-x: scroll;
|
||||
border: none;
|
||||
border-radius: 1rem;
|
||||
color: #88c0d0;
|
||||
}
|
||||
|
||||
.file {
|
||||
|
@ -1,8 +1,7 @@
|
||||
body {
|
||||
max-width: 900px;
|
||||
margin: auto;
|
||||
background: #303446;
|
||||
color: #c6d0f5;
|
||||
background: #81a1c1;
|
||||
}
|
||||
|
||||
|
||||
@ -12,9 +11,9 @@ h1 {
|
||||
}
|
||||
|
||||
a {
|
||||
color: #f2d5cf;
|
||||
text-decoration: none;
|
||||
font-style: bold;
|
||||
color: #ebcb8b;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
@ -23,8 +22,9 @@ a:hover {
|
||||
}
|
||||
|
||||
code {
|
||||
background: #414559;
|
||||
background: #88c0d0;
|
||||
border-radius: 10px;
|
||||
font-size: 105%;
|
||||
font-style: italic;
|
||||
padding: 2px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user