|
@@ -31,6 +31,15 @@ updatesudo(){
|
|
|
cp data/etc/$@ /etc/$@;
|
|
|
fi;
|
|
|
}
|
|
|
+download(){
|
|
|
+ local url=$1;
|
|
|
+ echo -n " ";
|
|
|
+ wget --progress=dot $url 2>&1 | grep --line-buffered "%" | sed -u -e "s,\.,,g" | awk '{printf("\b\b\b\b%4s", $2)}';
|
|
|
+ echo -ne "\b\b\b\b";
|
|
|
+}
|
|
|
+clone(){
|
|
|
+ git clone -q $1 $2;
|
|
|
+}
|
|
|
|
|
|
if [ "$(id -u)" != "0" ]; then
|
|
|
sudo $0;
|
|
@@ -42,14 +51,14 @@ section "Registering";
|
|
|
log "Getting IDs";
|
|
|
mkdir -p /tmp/omni-setup;
|
|
|
sublog "Hostname";
|
|
|
-wget -q "$REGISTER_URL/hostname" -O $TMP/hostname;
|
|
|
+download "$REGISTER_URL/hostname" $TMP/hostname;
|
|
|
if [[ "$(cat $TMP/hostname)" == "" ]];then
|
|
|
hostname > $TMP/hostname;
|
|
|
fi;
|
|
|
hostname $(cat $TMP/hostname);
|
|
|
cp $TMP/hostname /etc/hostname;
|
|
|
sublog "MySQL ID";
|
|
|
-wget -q "$REGISTER_URL/mysql-id" -O $TMP/mysql-id;
|
|
|
+download "$REGISTER_URL/mysql-id" $TMP/mysql-id;
|
|
|
|
|
|
section "Package Installation";
|
|
|
log "LAMP Stack";
|
|
@@ -73,12 +82,12 @@ echo "export PATH=$PATH:/opt/omnimaga/bin;" > /etc/profile.d/omnimaga-server-uti
|
|
|
. /etc/profile.d/omnimaga-server-utils.sh;
|
|
|
sublog "getting files";
|
|
|
rm -rf /opt/omnimaga/bin;
|
|
|
-git clone -q https://github.com/Omnimaga/server-utils.git /opt/omnimaga/bin/;
|
|
|
+clone https://github.com/Omnimaga/server-utils.git /opt/omnimaga/bin/;
|
|
|
chmod a+x /opt/omnimaga/bin/*;
|
|
|
subinfo "Add users to the group omnimaga-utils to allow access";
|
|
|
log "phpmyadmin";
|
|
|
sublog "Downloading";
|
|
|
-wget -q $PHPMYADMIN_URL -O $TMP/pma.tar.xz;
|
|
|
+download $PHPMYADMIN_URL $TMP/pma.tar.xz;
|
|
|
sublog "Extracting";
|
|
|
tar -C $TMP/ -xf $TMP/pma.tar.xz;
|
|
|
sublog "Copying";
|