-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresetpw.sh
30 lines (21 loc) · 980 Bytes
/
resetpw.sh
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
#!/bin/bash
echo "Removing old users file"
rm /var/www/html/bells/system/users.db
echo "Updating login/auth system to latest version"
wget https://raw.githubusercontent.com/Destreyf/Bells/master/web/bells/application/classes/controller/login.php -O /var/www/html/bells/application/classes/controller/login.php
wget https://raw.githubusercontent.com/Destreyf/Bells/master/web/bells/application/bootstrap.php -O /var/www/html/bells/application/bootstrap.php
ADMIN_USER="user"
ADMIN_PASSWORD="B3LL3"
read -p "Enter the Admin Username [user]: " ADMIN_USER
read -p "Enter the Admin Password [B3LL3]: " ADMIN_PASSWORD
if [[ -z "$ADMIN_USER" ]]; then
ADMIN_USER="user"
fi
if [[ -z "$ADMIN_PASSWORD" ]]; then
ADMIN_PASSWORD="B3LL3"
fi
wget "http://localhost/bells/index.php/login/setauth/$ADMIN_USER/$ADMIN_PASSWORD" -O /dev/null
IP=`hostname -I | cut -f1 -d' '`
echo "http://$IP/bells/"
echo "The Username is $ADMIN_USER"
echo "The Password is $ADMIN_PASSWORD"