-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathetc.sh
More file actions
28 lines (21 loc) · 698 Bytes
/
etc.sh
File metadata and controls
28 lines (21 loc) · 698 Bytes
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
#!/bin/bash
if [ ! -d "/home/www/default" ]; then
mkdir -vp /home/www/default
chown -R www:www /home/www/default
chmod -R 644 /home/www/default
fi
# adminer.php
curl -L https://github.com/vrana/adminer/releases/download/v4.7.1/adminer-4.7.1.php > /home/www/default/adminer.php
cp -rvf ./www/default/* /home/www/default/
cp -rvf ./etc/* /etc
echo
read -p "Please input nginx authorized_user pwd: " auth_user_pass
[ -z "$auth_user_pass" ] && auth_user_pass="no"
if [ "$auth_user_pass" != "no" ]; then
pwd=`openssl passwd -crypt $auth_user_pass`
printf "u1:$pwd\n" >> /etc/nginx/authorized_user.txt
fi
service php-fpm reload
service nginx reload
service redis restart
service mysqld reload