-
Notifications
You must be signed in to change notification settings - Fork 33
/
installer-beta.sh
113 lines (94 loc) · 3.8 KB
/
installer-beta.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/bin/bash
#-- UBUNTU 18.04 ONLY --
echo "############################################################################################"
echo "# DRMPHP 0.1 BY DRMSCRIPTS COMMUNITY - HTTPS://DRMSCRIPTS.COM #"
echo "# THIS INSTALL IS BASED ON INSTALLING ALL FILES IN PANEL FOLDER TO THE ROOT OF HTML FOLDER #"
echo "############################################################################################"
echo "####################################################"
echo "# INSTALL STEP 1: REPOS, PACKAGES & PANEL DOWNLOAD #"
echo "####################################################"
# Add Repos
apt install software-properties-common -y;
add-apt-repository ppa:ondrej/php -y;
add-apt-repository ppa:ondrej/apache2 -y;
add-apt-repository ppa:xapienz/curl34 -y;
# Remove any pending packages
apt-get autoremove -y;
# Run an update
apt-get update -y;
apt full-upgrade -y;
# Install MySQL, Apache2 & Aria2
apt install mysql-server apache2 aria2 -y;
apt-get install php7.2 php7.2-cli php7.2-json php7.2-common php7.2-mysql php7.2-zip php7.2-gd php7.2-mbstring php7.2-curl php7.2-xml php7.2-bcmath php7.2-bz2 php7.2-xmlrpc -y;
# Download Panel
cd /home;
apt install git -y;
git clone https://github.com/DRM-Scripts/DRMPHP;
echo "####################################################";
echo "# INSTALL STEP 2: MYSQL, SHORTTAGS, FFMPEG & PANEL #";
echo "####################################################";
#setup sql cnf
content="[mysqld]\nsql-mode=\"NO_ENGINE_SUBSTITUTION\"\n";
echo -e "$content" | tee /etc/mysql/my.cnf > /dev/null;
service mysql restart;
echo "MySQL configured successfully!";
#setup php.ini
sed -i -r 's/short_open_tag = Off$/short_open_tag = On/' /etc/php/7.2/cli/php.ini;
sed -i -r 's/short_open_tag = Off/short_open_tag = On/g' /etc/php/7.2/apache2/php.ini;
echo "php.ini configured successfully!";
#setup sudoers
line="www-data ALL=(ALL) NOPASSWD: ALL";
sed -i "$ a $line" /etc/sudoers;
echo "Sudoers configured successfully!";
service apache2 restart;
cd /home;
#download and setup ffmpeg
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz;
tar -xf ffmpeg-release-amd64-static.tar.xz;
cp -r ffmpeg-6.0-amd64-static/* /usr/bin;
echo "FFMpeg configured successfully!";
cd DRM*;
cp -r panel/. /var/www/html;
cd /var/www/html;
chmod +x mp4decrypt;
mkdir download;
chmod 777 download;
cd ../;
mkdir backup;
chmod 777 backup;
chmod 777 html;
cd /home;
cd DRM*;
cp panel/downloader.php /var/www/html;
echo "Panel configured successfully!";
echo "####################################################";
echo "# INSTALL STEP 3: MYSQL DATABASE SETUP #";
echo "####################################################";
cd /home/DRMPHP;
chmod 777 ./db.sh;
sed -i -e 's/\r$//' db.sh;
./db.sh;
echo "Database configured successfully!";
echo "####################################################";
echo "# INSTALL STEP 4: CLEANUP #";
echo "####################################################";
#delete default apache page
rm /var/www/html/index.html;
echo
echo
echo "####################################################";
echo "# INSTALLATION COMPLETE #";
echo "####################################################";
echo
echo
#--ACCESS
public_ip=$(wget -q "http://api.ipify.org" -O -);
echo "####################################################";
echo "# PANEL DETAILS #";
echo "####################################################";
echo "# USER: admin #";
echo "# PASS: Admin@2023## #";
echo "# URL: http://$public_ip/login.php #";
echo "####################################################";
echo "# NOTE: EDIT <M3U8 Download URL> IN SETTINGS PAGE #";
echo "####################################################";