-
Notifications
You must be signed in to change notification settings - Fork 0
/
04-webmin-setup-with-vdc-site-manager-package.sh
executable file
·40 lines (34 loc) · 1.68 KB
/
04-webmin-setup-with-vdc-site-manager-package.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
#!/bin/bash
## old format
##echo "#deb https://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list
##wget -c https://download.webmin.com/jcameron-key.asc -O /etc/apt/trusted.gpg.d/webmin-jcameron-key.asc
## New Format
echo "deb https://download.webmin.com/download/newkey/repository stable contrib" > /etc/apt/sources.list.d/webmin.list
wget -c https://download.webmin.com/developers-key.asc -O /etc/apt/trusted.gpg.d/developers-key.asc
apt-get update
apt-get -y install webmin
#apt-get -y install webmin --install-recommends
## copies all program of VDC
/bin/cp -pR files/rootdir-webmin/* /
mkdir -p /var/vdcsitemanager/nodes-config-backup/
mkdir -p /var/vdcsitemanager/nodes-scripts/
mkdir -p /var/vdcsitemanager/nodes-logs/
mkdir -p /var/vdcsitemanager/nodes-lock/
mkdir -p /etc/webmin/vdcsitemanager/resource-group/removedlist
mkdir -p /etc/webmin/vdcsitemanager/resource-group/activelist
mkdir -p /etc/webmin/vdcsitemanager/siteinfo
mkdir /etc/webmin/vdcsitemanager/data-sync-vm-config
mkdir -p /var/log/vdcsitemanager-logs
## ssh key-gen
ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ""
## change port from 10000 to 8383
sed -i "s/10000/8383/g" /etc/webmin/miniserv.conf
/etc/init.d/webmin restart 2>/dev/null
echo "manager:xxxxxjpihs:0" >> /etc/webmin/miniserv.users
echo "manager:vdcsitemanager custom" >> /etc/webmin/webmin.acl
cd /usr/share/webmin
WEPASSVPOP=`pwgen -c -1 8`
echo $WEPASSVPOP > /usr/local/src/manager-vdcmanager-pass
/usr/share/webmin/changepass.pl /etc/webmin manager `cat /usr/local/src/manager-vdcmanager-pass`
cd -
echo "Webmin run https on port 8383 use Firefox Browser to Access not Google Chrome as SSL Certifcate is not applied yet";