Changes

From Amahi Wiki
Jump to: navigation, search
no edit summary
<pre>ProxyPass / http://hda:10000/
ProxyPassReverse / http://hda:10000/</pre>
<pre>RedirectPermanent / http://hda:10000/</pre>* Redirect Webapp to SSL (add below ''ServerAlias''):
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
===Scripted Functions===
* Network Interface Name:
INTFC=`ifconfig | expand | cut -c1-8 | sort | uniq -u | awk -F: '{print $1;}' | grep -Fvx -e lo | grep -Fvx -e tun0`
 
or
 
INTFC=cat /etc/sysconfig/network-scripts/ifcfg-* | grep -m 1 NAME | sed 's/NAME="//' | sed 's/"//'`
* Fully Qualified Domain Name:
HSTNM=`hostname -f`
fi
* Arch (32- or 64-bit):
export ARCH=`getconf LONG_BIT`
if [ "$ARCH" = "64" ]; then
# 64-bit
fi
* HDA Domain Name:
export HDADOM=`cat /etc/resolv.conf | grep 'search' | awk '{ print $2 }'`;* HDA IP Address: export HDAIP=`ifconfig eth0 $INTFC | grep "inet addr" | awk '{ print $2 }' | awk 'BEGIN { FS=":" } { print $2 }'`; or  HDAIP=$(/sbin/ip -o -4 addr list $INTFC | awk '{print $4}' | cut -d/ -f1)
* First Admin User:
export FUSER=`/var/hda/platform/html/script/first-admin`
or
export FUSER=$(echo "SELECT login FROM users WHERE admin=1 ORDER BY id ASC LIMIT 1" | mysql hda_production -uamahihda -pAmahiHDARulez -s)
* Check OS Version:
export FVER=`cat /etc/fedora-release | awk -F'release ' '{print $2}' | sed 's/(Laughlin)//'`;
if [ $FVER == '14' ]; then
...
fi
or
export FVER=`cat /etc/fedora-release | awk -F'release ' '{print $2}' | sed 's/(Verne)//'`;
if [ $FVER == '16' ]; then
...
</HTML>' > html/index.html
chown apache:users html/index.html</pre>
* Netboot [[Netboot_TemplateNetboot_template|App Template]]
===Platform Services Feature===
#* Returns something, it's assumed it will be valid PIDs for that service
# Not recommended as <i>pgrep</i> may pick up other processes running by a name containing <name>, e.g., ssh-agent.
 
===systemd service template===
See http://blog.hqcodeshop.fi/archives/93-Handling-varrun-with-systemd.html for details.
12,424

edits