/[smecontribs]/rpms/smeserver-user-webspace/contribs8/smeserver-user-webspace.spec
ViewVC logotype

Diff of /rpms/smeserver-user-webspace/contribs8/smeserver-user-webspace.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by unnilennium, Sun Oct 27 22:03:11 2013 UTC Revision 1.2 by unnilennium, Sun Oct 27 23:09:14 2013 UTC
# Line 2  Summary: Enables user web spave on the e Line 2  Summary: Enables user web spave on the e
2  %define name smeserver-user-webspace  %define name smeserver-user-webspace
3  Name: %{name}  Name: %{name}
4  %define version 0.1  %define version 0.1
5  %define release 5.SME7  %define release 6
6  Version: %{version}  Version: %{version}
7  Release: %{release}  Release: %{release}%{dist}
8  Copyright: GPL  License: GPL
9  Group: Networking/Daemons  Group: Networking/Daemons
10  Source: %{name}-%{version}.tar.gz  Source: %{name}-%{version}.tar.gz
11  Patch0: %{name}-%{version}.patch0  Patch0: %{name}-%{version}.patch0
12  Patch1: %{name}-%{version}.patch1  Patch1: %{name}-%{version}.patch1
13  Patch2: %{name}-%{version}.patch2  Patch2: %{name}-%{version}.patch2
14    Patch3: smeserver-user-webspace-0.1.patch3
15  Packager: Jean-Philippe Pialasse <unnilennium@pialasse.com>  Packager: Jean-Philippe Pialasse <unnilennium@pialasse.com>
16  BuildRoot: /var/tmp/e-smith-buildroot  BuildRoot: /var/tmp/e-smith-buildroot
17  BuildArchitectures: noarch  BuildArchitectures: noarch
18  Requires: smeserver-release >= 7.0  Requires: smeserver-release >= 8.0
19  AutoReqProv: no  AutoReqProv: no
20    BuildRequires:  e-smith-devtools
21    
22    %changelog
23    * Sun Oct 27 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-6.sme
24    - initial import for sme8
25    
26    * Fri Sep 08 2006 Jean-Philippe Pialasse <unnilennium@pialasse.com>
27    - adaptation ot  the contrib to the SME 7 architecture
28    * Thu Nov 23 2000 Damien Curtain <damien@pagefault.org>
29    - Moved the userdir template into templates-custom, utilising
30    - a new feature of e-smith-4.0.1 and greater.
31    
32    * Wed Nov 22 2000 Damien Curtain <damien@pagefault.org>
33    - Added new templates. Added then removed;) ability to
34    - set userdir. Added www/user aliases. Post install script
35    - to prompt people to turn this on/off.
36    
37    * Tue Nov 21 2000 Paul Nesbit <pkn@e-smith.com>
38    - initial release
39    
40  %description  %description
41  Enables the e-smith server and gateway to host user web pages  Enables the e-smith server and gateway to host user web pages
# Line 33  rm root/etc/e-smith/templates/etc/httpd/ Line 53  rm root/etc/e-smith/templates/etc/httpd/
53  rm root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/50UserDir00  rm root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/50UserDir00
54  %patch1 -p1  %patch1 -p1
55  %patch2 -p1  %patch2 -p1
56    %patch3 -p1
57    
58  %build  %build
59    
# Line 51  rm -rf $RPM_BUILD_ROOT Line 72  rm -rf $RPM_BUILD_ROOT
72  if [ $1 = 1 ] ; then  if [ $1 = 1 ] ; then
73      enable_user_webspace() {      enable_user_webspace() {
74    
75          echo 'You now have the option to enable user web directories.'  #        echo 'You now have the option to enable user web directories.'
76          echo  #        echo
77          echo -n 'Would you like to enable User Directories? (y/N): '  #        echo -n 'Would you like to enable User Directories? (y/N): '
78    #
79          read choice < /dev/tty  #        read choice < /dev/tty
80    #
81          if [ x$choice = xy ] ; then  #        if [ x$choice = xy ] ; then
82              /sbin/e-smith/config set UserPublicWeb on  #            /sbin/e-smith/config set UserPublicWeb service status on
83              /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf  #            /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
84              service httpd-e-smith restart  #            service httpd-e-smith restart
85          elif [ x$choice = xY ] ; then  #        elif [ x$choice = xY ] ; then
86              /sbin/e-smith/config set UserPublicWeb on  #            /sbin/e-smith/config set UserPublicWeb service status on
87              /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf  #            /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
88              service httpd-e-smith restart  #            service httpd-e-smith restart
89          else  #        else
90              /sbin/e-smith/config set UserPublicWeb off  #            /sbin/e-smith/config set UserPublicWeb service status off
91          fi  #        fi
92            #      
93          echo "adding html folder in user skeleton"  #       echo "adding html folder in user skeleton"
94          mkdir -p  /etc/e-smith/skel/user/home/public_html  #       mkdir -p  /etc/e-smith/skel/user/home/public_html
95          cp /etc/e-smith/events/actions/user-create-unix  /tmp/user-create-unix          cp /etc/e-smith/events/actions/user-create-unix  /tmp/user-create-unix
96          cp /etc/e-smith/events/actions/user-create-unix /etc/e-smith/events/actions/user-create-unix.backup          cp /etc/e-smith/events/actions/user-create-unix /etc/e-smith/events/actions/user-create-unix.backup
97          echo "modifying user folder permission in user-create-unix from chmod 0700 to chmod 0755"          echo "modifying user folder permission in user-create-unix from chmod 0700 to chmod 0755"
# Line 85  system(\"/bin/chown\", \":www\", \"/home Line 106  system(\"/bin/chown\", \":www\", \"/home
106  a\\  a\\
107  system(\"/bin/chown\", \":www\", \"/home/e-smith/files/users/\$userName\");  system(\"/bin/chown\", \":www\", \"/home/e-smith/files/users/\$userName\");
108  }" /etc/e-smith/events/actions/user-create-unix.backup > /etc/e-smith/events/actions/user-create-unix  }" /etc/e-smith/events/actions/user-create-unix.backup > /etc/e-smith/events/actions/user-create-unix
109    # here we need to add  something for tmp folder
110                    
111          echo "modifying existing users spaces"          echo "modifying existing users spaces"
112          ls -1 /home/e-smith/files/users/ >/tmp/listeusers          ls -1 /home/e-smith/files/users/ >/tmp/listeusers
# Line 98  system(\"/bin/chown\", \":www\", \"/home Line 120  system(\"/bin/chown\", \":www\", \"/home
120                  mkdir -p /home/e-smith/files/users/$line/home/public_html                  mkdir -p /home/e-smith/files/users/$line/home/public_html
121                  chown -R $line:www  /home/e-smith/files/users/$line/home/public_html                              chown -R $line:www  /home/e-smith/files/users/$line/home/public_html            
122                  chmod -R 2770 /home/e-smith/files/users/$line/home/public_html                  chmod -R 2770 /home/e-smith/files/users/$line/home/public_html
123                    mkdir -p /home/e-smith/files/users/$line/tmp
124                    chown -R $line:www  /home/e-smith/files/users/$line/tmp
125                    chmod -R 2770 /home/e-smith/files/users/$line/tmp
126              fi              fi
127          done          done
128      }      }
# Line 108  fi Line 132  fi
132    
133  %postun  %postun
134  if [ $1 = 0 ] ; then  if [ $1 = 0 ] ; then
135      /sbin/e-smith/config delete UserPublicWeb  #    /sbin/e-smith/config delete UserPublicWeb
136      /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf  #    /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
137      service httpd-e-smith restart  #    service httpd-e-smith restart
138      cp /etc/e-smith/events/actions/user-create-unix  /tmp/user-create-unix      cp /etc/e-smith/events/actions/user-create-unix  /tmp/user-create-unix
139      echo "modifying user folder permission in user-create-unix from chmod 0755 to chmod 0700"      echo "modifying user folder permission in user-create-unix from chmod 0755 to chmod 0700"
140      sed -e "/chmod 0770/d"  /tmp/user-create-unix > /tmp/user-create-unix2      sed -e "/chmod 0770/d"  /tmp/user-create-unix > /tmp/user-create-unix2
141      sed -e "s|chmod 0710|chmod 0700|g"  /tmp/user-create-unix2 > /tmp/user-create-unix3      sed -e "s|chmod 0710|chmod 0700|g"  /tmp/user-create-unix2 > /tmp/user-create-unix3
142      sed -e "/chown/d"  /tmp/user-create-unix3 > /etc/e-smith/events/actions/user-create-unix      sed -e "/chown/d"  /tmp/user-create-unix3 > /etc/e-smith/events/actions/user-create-unix
143      echo "removing html folder in user directory skeleton"  #    echo "removing html folder in user directory skeleton"
144      rm -r  /etc/e-smith/skel/user/home/public_html        #    rm -r  /etc/e-smith/skel/user/home/public_html      
145      ls -1 /home/e-smith/files/users/ >/tmp/listeusers  #    ls -1 /home/e-smith/files/users/ >/tmp/listeusers
146      cat /tmp/listeusers|while read line      cat /tmp/listeusers|while read line
147      do      do
148          if [ "admin" != "$line" ]          if [ "admin" != "$line" ]
# Line 134  fi Line 158  fi
158  %files -f %{name}-%{version}-filelist  %files -f %{name}-%{version}-filelist
159  %defattr(-,root,root)  %defattr(-,root,root)
160    
 %changelog  
 * Fri Sep 08 2006 Jean-Philippe Pialasse <unnilennium@pialasse.com>  
 - adaptation ot  the contrib to the SME 7 architecture  
 * Thu Nov 23 2000 Damien Curtain <damien@pagefault.org>  
 - Moved the userdir template into templates-custom, utilising  
 - a new feature of e-smith-4.0.1 and greater.  
   
 * Wed Nov 22 2000 Damien Curtain <damien@pagefault.org>  
 - Added new templates. Added then removed;) ability to  
 - set userdir. Added www/user aliases. Post install script  
 - to prompt people to turn this on/off.  
   
 * Tue Nov 21 2000 Paul Nesbit <pkn@e-smith.com>  
 - initial release  


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed