A new user interface for you! Read more...

File config.sh of Package Wordpress

#!/bin/bash
#================
# FILE          : config.sh
#----------------
# PROJECT       : OpenSuSE KIWI Image System
# COPYRIGHT     : (c) 2006 SUSE LINUX Products GmbH. All rights reserved
#               :
# AUTHOR        : Marcus Schaefer <ms@suse.de>
#               :
# BELONGS TO    : Operating System images
#               :
# DESCRIPTION   : configuration script for SUSE based
#               : operating systems
#               :
#               :
# STATUS        : BETA
#----------------
#======================================
# Functions...
#--------------------------------------
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile

#======================================
# Greeting...
#--------------------------------------
echo "Configure image: [$name]..."

#======================================
# SuSEconfig
#--------------------------------------
echo "** Running suseConfig..."
suseConfig

echo "** Running ldconfig..."
/sbin/ldconfig

#======================================
# Setup default runlevel
#--------------------------------------
baseSetRunlevel 3

#======================================
# Add missing gpg keys to rpm
#--------------------------------------
suseImportBuildKey


#======================================
# Firewall Configuration
#--------------------------------------
echo '** Configuring firewall...'
chkconfig SuSEfirewall2_init on
chkconfig SuSEfirewall2_setup on

sed --in-place -e 's/# solver.onlyRequires.*/solver.onlyRequires = true/' /etc/zypp/zypp.conf

#======================================
# Sysconfig Update
#--------------------------------------
echo '** Update sysconfig entries...'
baseUpdateSysConfig /etc/sysconfig/keyboard KEYTABLE us.map.gz
baseUpdateSysConfig /etc/sysconfig/network/config FIREWALL yes
baseUpdateSysConfig /etc/init.d/suse_studio_firstboot NETWORKMANAGER no
baseUpdateSysConfig /etc/sysconfig/SuSEfirewall2 FW_SERVICES_EXT_TCP 22\ 80\ 443
baseUpdateSysConfig /etc/sysconfig/console CONSOLE_FONT lat9w-16.psfu


#======================================
# Setting up overlay files 
#--------------------------------------
echo '** Setting up overlay files...'
echo mkdir -p /srv/www/htdocs/
mkdir -p /srv/www/htdocs/
echo tar xfp /image/ff84abd9ec38b93ef0ea09b05e85467b -C /srv/www/htdocs/
tar xfp /image/ff84abd9ec38b93ef0ea09b05e85467b -C /srv/www/htdocs/
echo rm /image/ff84abd9ec38b93ef0ea09b05e85467b
rm /image/ff84abd9ec38b93ef0ea09b05e85467b
mkdir -p /srv/www/htdocs/
mv /studio/overlay-tmp/files//srv/www/htdocs//latest.tar.gz /srv/www/htdocs//latest.tar.gz
chown nobody:nobody /srv/www/htdocs//latest.tar.gz
chmod 644 /srv/www/htdocs//latest.tar.gz
echo mkdir -p /var/lib/
mkdir -p /var/lib/
echo tar xfp /image/mysqltargz-rYLY71VZbJ -C /var/lib/
tar xfp /image/mysqltargz-rYLY71VZbJ -C /var/lib/
echo rm /image/mysqltargz-rYLY71VZbJ
rm /image/mysqltargz-rYLY71VZbJ
mkdir -p /var/lib/
mv /studio/overlay-tmp/files//var/lib//mysql.tar.gz /var/lib//mysql.tar.gz
chown root:root /var/lib//mysql.tar.gz
chmod 644 /var/lib//mysql.tar.gz
mkdir -p /etc/sysconfig/
mv /studio/overlay-tmp/files//etc/sysconfig//apache2 /etc/sysconfig//apache2
chown root:root /etc/sysconfig//apache2
chmod 644 /etc/sysconfig//apache2
mkdir -p /usr/
mv /studio/overlay-tmp/files//usr//my.cnf /usr//my.cnf
chown root:root /usr//my.cnf
chmod 644 /usr//my.cnf
mkdir -p /root/
mv /studio/overlay-tmp/files//root//wp-config.php /root//wp-config.php
chown nobody:nobody /root//wp-config.php
chmod 644 /root//wp-config.php
test -d /studio || mkdir /studio
cp /image/.profile /studio/profile
cp /image/config.xml /studio/config.xml
chown root:root /studio/build-custom
chmod 755 /studio/build-custom
# run custom build_script after build
if ! /studio/build-custom; then
    cat <<EOF

*********************************
/studio/build-custom failed!
*********************************

EOF

    exit 1
fi
rm -rf /studio/overlay-tmp
true

#======================================
# SSL Certificates Configuration
#--------------------------------------
echo '** Rehashing SSL Certificates...'
c_rehash