1 Star 0 Fork 0

开源中国首席哪(na)吒(tuo)脑海/PiscesQoLDashboard

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
install.sh 2.29 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
userdel admin2
userdel admin
groupdel admin
groupdel admin2
rm -rf /home/admin
rm -rf /home/admin2
adduser --disabled-password --gecos "" admin
echo admin:admin | chpasswd
usermod admin -g sudo
if id -nG admin; then
wget https://raw.githubusercontent.com/david-king/PiscesQoLDashboard/install/latest.tar.gz -O /tmp/latest.tar.gz
#wget http://192.168.31.55:8012/latest.tar.gz -O /tmp/latest.tar.gz
cd /tmp
if test -f latest.tar.gz; then
tar -xzf latest.tar.gz
cd dashboardinstall
systemctl stop pm2-pi.service
systemctl disable pm2-pi.service
apt-get update
apt-get --assume-yes install nginx php-fpm php7.3-fpm pptp-linux openvpn
mkdir /var/dashboard
mkdir /etc/monitor-scripts
cp -r dashboard/* /var/dashboard/
cp monitor-scripts/* /etc/monitor-scripts/
cp nginx/certs/nginx-selfsigned.crt /etc/ssl/certs/
cp nginx/certs/nginx-selfsigned.key /etc/ssl/private/
cp nginx/snippets/* /etc/nginx/snippets/
cp nginx/default /etc/nginx/sites-enabled
if ! test -f /var/dashboard/.htpasswd; then
cp nginx/.htpasswd /var/dashboard/.htpasswd
fi
cp nginx/dhparam.pem /etc/ssl/certs/dhparam.pem
cp systemd/* /etc/systemd/system/
chmod 755 /etc/monitor-scripts/*
chown root:www-data /var/dashboard/services/*
chown root:www-data /var/dashboard/statuses/*
chown root:www-data /var/dashboard/vpn/*
chmod 775 /var/dashboard/services/*
chmod 775 /var/dashboard/statuses/*
chmod 775 /var/dashboard/vpn/*
chown root:root /etc/ssl/private/nginx-selfsigned.key
chmod 600 /etc/ssl/private/nginx-selfsigned.key
chown root:root /etc/ssl/certs/nginx-selfsigned.crt
chmod 777 /etc/ssl/certs/nginx-selfsigned.crt
chown root:www-data /var/dashboard/.htpasswd
chmod 775 /var/dashboard/.htpasswd
chown root:www-data /var/dashboard
chmod 775 /var/dashboard
FILES="systemd/*.timer"
for f in $FILES;
do
name=$(echo $f | sed 's/.timer//' | sed 's/systemd\///')
systemctl start $name.timer
systemctl enable $name.timer
systemctl start $name.service
done
systemctl start install-dashboard.service
echo 'Success.'
else
echo 'No installation archive found. No changes made.'
fi
else
echo 'Error checking if admin user exists. No changes made.';
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/King_David/PiscesQoLDashboard.git
git@gitee.com:King_David/PiscesQoLDashboard.git
King_David
PiscesQoLDashboard
PiscesQoLDashboard
install

搜索帮助