jablonka.czprosek.czf

freenet-router

Subversion Repositories:
[/] [trunk/] [freenet-router/] [DEBIAN/] [postinst] - Rev 2

Compare with Previous - Blame - Download


#!/bin/bash

set -e

case "$1" in

   configure)
        # Apache
        a2dissite default
        a2ensite freenet-router
        a2ensite freenet-router-ssl     
        mkdir -p /var/log/apache2
        chown root:adm /var/log/apache2
        chmod 750 /var/log/apache2 
        a2enmod ssl
        a2enmod rewrite
        a2enmod actions 
        a2enmod alias 
        a2enmod fastcgi
        service apache2 restart
        service php5-fpm restart

        # Usefull commands

        if [ ! -f /usr/local/sbin/rw ];
        then    
                ln -s /usr/local/sbin/remountrw /usr/local/sbin/rw
        fi
        if [ ! -f /usr/local/sbin/ro ];
        then
                ln -s /usr/local/sbin/remountro /usr/local/sbin/ro 
        fi

        # Necesary folders in tmpfs

        # SSH
        touch /var/log/lastlog
        chgrp utmp /var/log/lastlog
        chmod 664 /var/log/lastlog

        # safe user
        adduser --quiet --disabled-password --gecos "" safe

        # locales
        export LC_ALL=en_US.UTF-8
        export LANGUAGE=en_US
        locale-gen en_US.UTF-8
   ;;

   *)
      echo "postinst called with unknown argument \`\$1'" >&2
   ;;

esac

exit 0


Powered by WebSVN 2.2.1