forked from ultraseedbox/UltraSeedbox-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stash2
33 lines (28 loc) · 1020 Bytes
/
stash2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
printf "\033[0;31mDisclaimer: This installer is unofficial and USB staff will not support any issues with it.\033[0m\n"
read -p "Type confirm if you wish to continue: " input
if [ ! "$input" = "confirm" ]
then
exit
fi
#Install stast
git clone https://github.com/stashapp/stash/releases/latest/download/stash-linux ~/www/stash
#Install nginx conf
echo 'location /stash/api/v2 {
try_files $uri /stash/api/v2/index.php$is_args$args;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
}' > "$HOME/.apps/nginx/proxy.d/stash.conf"
#Restart Nginx
app-nginx restart
echo ""
echo ""
echo ""
echo "You should now proceed to access stash via https://$USER.$HOSTNAME.usbx.me/stash"
echo "You will need to use your HTTP access credentials"