This commit is contained in:
ahmadbilalkhalid 2019-09-10 17:35:34 +05:00
commit 0138fb3349
3 changed files with 24 additions and 1 deletions

14
init.sh
View file

@ -3,12 +3,24 @@ get_distro() {
echo $OS
}
# These directories would be need if user chooses
# to setup ucloud without CEPH
mkdir /var/vm
mkdir /var/www
mkdir /var/image
if ! grep -q "export LC_ALL=C.UTF-8" ~/.bashrc; then
echo 'export LC_ALL=C.UTF-8' >> ~/.bashrc
echo 'export LANG=C.UTF-8' >> ~/.bashrc
source ~/.bashrc
fi
if ! grep -q "alias etcdctl='ETCDCTL_API=3 etcdctl'" ~/.bashrc; then
echo "alias etcdctl='ETCDCTL_API=3 etcdctl'" >> ~/.bashrc
source ~/.bashrc
fi
case $(get_distro) in
"alpine")
# Install QEMU
@ -43,7 +55,7 @@ EOF
apt upgrade --yes
# Install QEMU
apt install qemu python3 ceph python-pip python3-pip etcd-client --yes
apt install qemu qemu-system python3 ceph python-pip python3-pip etcd-client --yes
;;
*)
echo "Unsupported OS/Distribution"