Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ApartVW/writeIni-file.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
75 lines (68 sloc)
1.59 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Write ini file for apartvw | |
# | |
workingDir=`pwd` | |
iniName="apartVw.ini" | |
if [ $# -eq 1 ] | |
then | |
workingDir=$1 | |
fi | |
if [ $# -eq 2 ] | |
then | |
workingDir=$1 | |
iniName=$2 | |
fi | |
echo "WorkingDir = $workingDir, iniName = $iniName" | |
cat > $iniName << EOF | |
; | |
; Ini file for apartVw will set all used inc dirs etc | |
; This file should be parsed first in all php files | |
; use parse_ini_file("../iniName"); | |
; | |
[General] | |
; | |
AV_instName = "Fritz-Haber-Institut" | |
AV_instNameK = "FHI" | |
AV_gesName = "Max-Planck-Gesellschaft" | |
; | |
AV_instAdr = "Faradayweg 4-6, 14195 Berlin " | |
AV_gHouseAdr="Faradayweg 14, 14195 Berlin " | |
; | |
AV_telNightGuards= "(tel: 030 8413 3637)" | |
; | |
EOF | |
echo "[Web]" >> $iniName | |
echo ";" >> $iniName | |
echo "WebHome = $workingDir" >> $iniName | |
echo "AV_PHP_DIR = /php" >> $iniName | |
echo "AV_INC_DIR = $workingDir/inc" >> $iniName | |
echo "AV_SRCINC_DIR = ../inc" >> $iniName | |
echo "AV_CSS_DIR = /css" >> $iniName | |
echo "AV_IMG_DIR = /img" >> $iniName | |
echo "AV_JS_DIR = /js" >> $iniName | |
echo "AV_TOOL_DIR = $workingDir/tool" >> $iniName | |
echo "AV_FORM_DIR = $workingDir/form" >> $iniName | |
echo "AV_INFOS_DIR = /infos" >> $iniName | |
# Document root in apache.conf | |
# DocumentRoot /home/apartvw/develop/ApartVW | |
# should be equal workingDIr | |
echo "AV_INCLUDE_DIR = /css:/img:/php:/js:/infos:/form:/tool" >>$iniName | |
cat >> $iniName << EOF | |
; | |
[Database] | |
AV_dbserver = "brezen" | |
AV_dbuser = "www" | |
AV_dbpassword = "fhiiqm" | |
AV_dbname = "apartVwNeu" | |
AV_dbtype = "mysql" | |
; | |
[LDAP] | |
AV_ldaphost = "ldap.rz-berlin.mpg.de" | |
AV_ldapport = 389 | |
; | |
[MAIL] | |
; might not be used, if postfix uses smart host | |
AV_mailhost = "mail.fhi-berlin.mpg.de" | |
; | |
EOF |