-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathinstall-mikhmon.txt
38 lines (38 loc) · 971 Bytes
/
install-mikhmon.txt
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
#bin/bash
pkg install git php -y
git clone https://github.com/laksa19/mikhmonv3.git
cat >start-mikhmon <<EOL
#bin/bash
if pgrep "php" >/dev/null 2>&1 ; then
killall php
fi
cd mikhmonv3
php -S 0.0.0.0:8080
EOL
cat >update-mikhmon <<EOL
#bin/bash
mkdir ~/backup-mikhmon
cp ~/mikhmonv3/include/config.php ~/backup-mikhmon/config.php
cp -rf ~/mikhmonv3/voucher/. ~/backup-mikhmon/voucher/
cp -rf ~/mikhmonv3/img/. ~/backup-mikhmon/img/
rm -rf mikhmonv3
rm ~/backup-mikhmon/voucher/print.php
rm ~/backup-mikhmon/voucher/printbt.php
git clone https://github.com/laksa19/mikhmonv3.git
cp ~/backup-mikhmon/config.php ~/mikhmonv3/include/config.php
cp -rf ~/backup-mikhmon/voucher/. ~/mikhmonv3/voucher/
cp -rf ~/backup-mikhmon/img/. ~/mikhmonv3/img/
rm -rf ~/backup-mikhmon
./start-mikhmon
EOL
cat >remove-mikhmon <<EOL
#bin/bash
rm -rf mikhmonv3
EOL
cat >.bashrc <<EOL
~/start-mikhmon
EOL
chmod +x start-mikhmon
chmod +x update-mikhmon
chmod +x remove-mikhmon
./start-mikhmon