43 lines
799 B
Bash
43 lines
799 B
Bash
#!/bin/bash
|
|
|
|
|
|
|
|
printf "+ Installing depandencies \n"
|
|
|
|
apt install openjdk-17-jre-headless screen
|
|
|
|
|
|
if [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z $ansFirewallSetup ]]; then
|
|
apt install iptables -y
|
|
fi
|
|
|
|
### User managment
|
|
|
|
printf "+ creating group and user for proxy \n"
|
|
groupadd velocity
|
|
|
|
useradd --system --shell /usr/sbin/nologin --home /opt/velocity -g velocity velocity
|
|
|
|
|
|
### File structure
|
|
|
|
printf "+ creating file structure in /opt/velocity/ \n"
|
|
mkdir /opt/velocity
|
|
|
|
cp data/velocity*.jar start.sh /opt/velocity/
|
|
|
|
mkdir /opt/velocity/plugins
|
|
|
|
cp data/velocity.toml /opt/velocity/
|
|
cp data/forwarding.secret /opt/velocity/
|
|
cp data/start.sh /opt/velocity/
|
|
cp data/server-icon.png /opt/velocity/
|
|
|
|
### Permisions
|
|
|
|
printf "+ handeling permisions \n"
|
|
chown -R velocity:velocity /opt/velocity/
|
|
|
|
|
|
|