flavors diff dolibarr/distro.sh @ rev 154
Add: Dolibarr flavor.
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sun Mar 11 02:00:09 2012 +0100 (2012-03-11) |
parents | |
children | b15932f93d49 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dolibarr/distro.sh Sun Mar 11 02:00:09 2012 +0100 1.3 @@ -0,0 +1,103 @@ 1.4 +#!/bin/sh 1.5 +# distro.sh, changet set for slitaz-dolibarr 1.6 +# 1.7 +# Eric Joseph-Alexandre <erjo@slitaz.org> 1.8 + 1.9 +ROOTFS=$PWD/rootfs 1.10 +HOSTNAME="dolilive" 1.11 +AUTOSTART="apache mysql" 1.12 +DONTSTART="httpd" 1.13 +ALLOW_ROOT_LOGIN="1" 1.14 +BLOCKED_PACKAGES="" 1.15 + 1.16 +# Disable auto-install dependencies 1.17 +sed -i s/AUTO_INSTALL.*/AUTO_INSTALL_DEPS=\"no\"/ $ROOTFS/etc/slitaz/tazpkg.conf 1.18 + 1.19 +## 1.20 +## 1.21 +if [ ! -z "$BLOCKED_PACKAGES" ]; then 1.22 + touch $ROOTFS/var/lib/tazpkg/blocked-packages.list 1.23 + for i in $BLOCKED_PACKAGES 1.24 + do 1.25 + echo $i >> $ROOTFS/var/lib/tazpkg/blocked-packages.list 1.26 + done 1.27 +fi 1.28 + 1.29 + 1.30 +# Set static IP config: IP=92.168.1.6/24. Gateway=192.168.1.1 DNS: 192.168.1.1 1.31 + 1.32 +if [ ! -z $IP_STATIC ]; then 1.33 + sed -i -e 's/DHCP=.*/DHCP=\"no\"/' \ 1.34 + -e 's/STATIC=.*/STATIC=\"yes\"/' \ 1.35 + -e 's/IP=.*/IP=\"192.168.1.6\"/' \ 1.36 + -e 's/GATEWAY=.*/GATEWAY=\"192.168.1.1\"/' \ 1.37 + -e 's/DNS_SERVER=.*/DNS_SERVER=\"192.168.1.1\"/' $ROOTFS/etc/network.conf 1.38 +fi 1.39 + 1.40 +# Change default hostname 1.41 +if [ ! -z "$HOSTNAME" ]; then 1.42 + echo "* Setting hostname to $HOSTNAME" 1.43 + echo "$HOSTNAME" > $ROOTFS/etc/hostname 1.44 + # Change hosts 1.45 + sed -i -e "s/slitaz/$HOSTNAME/" $ROOTFS/etc/hosts 1.46 +fi 1.47 + 1.48 +# Start daemons at boot time 1.49 +if [ ! -z "$AUTOSTART" ]; then 1.50 + echo "* Enabling daemons at boot" 1.51 + sed -i -e "s/RUN_DAEMONS=\"\(.*\)\"/RUN_DAEMONS=\"\1 $AUTOSTART\"/" \ 1.52 + $ROOTFS/etc/rcS.conf 1.53 +fi 1.54 + 1.55 +# Dont start daemons at boot time 1.56 +if [ ! -z "$DONTSTART" ]; then 1.57 + echo "* Disabling daemons at boot" 1.58 + sed -i -e "s/$DONTSTART//" \ 1.59 + $ROOTFS/etc/rcS.conf 1.60 +fi 1.61 + 1.62 +## 1.63 +## Custom config 1.64 +## 1.65 + 1.66 +# Allow SSH root login from remote computer. 1.67 +if [ $ALLOW_ROOT_LOGIN = "1" ]; then 1.68 + echo "Allow root login using SSH" 1.69 + sed -i 's!DROPBEAR_OPTIONS=.*!DROPBEAR_OPTIONS="-b /etc/dropbear/banner"!' \ 1.70 + $ROOTFS/etc/daemons.conf 1.71 +fi 1.72 + 1.73 +# Fix Apache config 1.74 +sed -i '/#ServerName/ { 1.75 + a\ServerName localhost 1.76 +}' $ROOTFS/etc/apache/httpd.conf 1.77 + 1.78 +# 1.79 +sed -i 's/DirectoryMatch/Directory/' $ROOTFS/etc/apache/conf.d/phpmyadmin 1.80 + 1.81 +# Remove extra files 1.82 +rm -rf $ROOTFS/etc/apache/phpinfo 1.83 +rm -rf $ROOTFS/usr/share/applications/lua.* 1.84 +rm -rf $ROOTFS/usr/share/applications/sqlite.* 1.85 +rm -rf $ROOTFS/usr/share/applications/gtkdialog.* 1.86 +rm -rf $ROOTFS/usr/share/applications/php.* 1.87 +rm -rf $ROOTFS/usr/share/applications/dialog.* 1.88 + 1.89 +# Default config 1.90 +sed -i 's/tazweb/midori/' $ROOTFS/etc/slitaz/applications.conf 1.91 + 1.92 +# 1.93 +#~ sed -i 's/transparent=1/transparent=0/' $ROOTFS/usr/share/lxpanel/profile/default/panels/panel 1.94 +#~ sed -i 's/transparent=1/transparent=0/' $ROOTFS/etc/lxpanel/default/panels/panel 1.95 +#~ sed -i 's/transparent=1/transparent=0/' $ROOTFS/etc/lxpanel/original/panels/panel 1.96 +sed -i 's/tazweb/midori/' $ROOTFS/usr/share/lxpanel/profile/default/panels/panel 1.97 +sed -i 's/tazweb/midori/' $ROOTFS/etc/lxpanel/default/panels/panel 1.98 +sed -i 's/tazweb/midori/' $ROOTFS/etc/lxpanel/original/panels/panel 1.99 + 1.100 +#~ 1.101 +# fix perms (don(t know why) 1.102 +chmod 755 $ROOTFS/etc/mysql.d/* 1.103 + 1.104 +# Add shorcut on the Desktop 1.105 +cp $ROOTFS/usr/share/applications/dolibarr.desktop $ROOTFS/etc/skel/Desktop 1.106 +#cp $ROOTFS/usr/share/applications/phpmyadmin.desktop $ROOTFS/etc/skel/Desktop