Browse Source

Make downloads prettier. pma.conf

Nathaniel van Diepen 9 years ago
parent
commit
30806f33e8
3 changed files with 30 additions and 4 deletions
  1. 17 0
      data/etc/apache2/sites-available/pma.conf
  2. BIN
      download
  3. 13 4
      install.sh

+ 17 - 0
data/etc/apache2/sites-available/pma.conf

@@ -0,0 +1,17 @@
+<VirtualHost pma.omnimaga.org:80>
+	UseCanonicalName Off
+	VirtualDocumentRoot /var/www/phpmyadmin
+	<Directory /var/www/phpmyadmin>
+		AddHandler cgi-script .cgi
+		Options +ExecCGI +Indexes +FollowSymLinks +MultiViews
+		AllowOverride All
+		RewriteEngine On
+		# Require all granted
+		Order allow,deny
+		allow from all
+	</Directory>
+	ErrorLog ${APACHE_LOG_DIR}/error.log
+	# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
+	CustomLog ${APACHE_LOG_DIR}/access.log combined
+	ServerAdmin [email protected]
+</VirtualHost>

BIN
download


+ 13 - 4
install.sh

@@ -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;
+}
 # Make sure the script is running as root
 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";