Changeset 795 in ProjectBuilder for projects/fossology
- Timestamp:
- Jul 2, 2009, 9:09:19 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
projects/fossology/pbconf/trunk/fossology/rpm/fossology.spec
r793 r795 89 89 %post 90 90 91 # Check postgresql is running 92 LANGUAGE=C /etc/init.d/postgresql status 2>&1 | grep -q stop 93 if [ $? -eq 0 ]; then 94 /etc/init.d/postgresql start 95 fi 96 chkconfig --add postgresql 97 91 98 # We suppose that we use the local postgresql installed on the same machine. 92 99 cat >> /var/lib/pgsql/data/pg_hba.conf << EOF … … 96 103 # IPv4 local connections: 97 104 host all all 127.0.0.1/32 md5 98 # IPv6 local connections:99 host all all ::1/128 ident sameuser100 105 101 106 EOF 107 # Comment previous setup 102 108 perl -pi -e 's|(host\s+all\s+all\s+127.0.0.1/32\s+ident\s+sameuser)|#$1|' /var/lib/pgsql/data/pg_hba.conf 109 perl -pi -e 's|(local\s+all\s+all\s+127.0.0.1/32\s+ident\s+sameuser)|#$1|' /var/lib/pgsql/data/pg_hba.conf 103 110 104 # Check postgresql is running 105 LANGUAGE=C /etc/init.d/postgresql status 2>&1 | grep -q stop 106 if [ $? -eq 0 ]; then 107 /etc/init.d/postgresql start 108 else 109 # Reload doesn't seem to work here 110 /etc/init.d/postgresql restart 111 fi 112 chkconfig --add postgresql 111 # Now restart again postgresql 112 # We have do it here in order to let postgresql configure itself correctly 113 # in case it wasn't already installed 114 /etc/init.d/postgresql restart 113 115 114 116 # To avoid fossology setup to fail, leave it time to start … … 121 123 # Adds user httpd to fossy group 122 124 #useradd -G fossy httpd 123 perl -pi -e 's/^fossy:x:([0-9]+):/fossy:x:$1:httpd/' /etc/group 125 perl -pi -e 's/^fossy:x:([0-9]+):(.+)/fossy:x:$1:httpd,$2/' /etc/group 126 perl -pi -e 's/^fossy:x:([0-9]+):$/fossy:x:$1:httpd/' /etc/group 124 127 125 128 # httpd is also assumed to run locally
Note:
See TracChangeset
for help on using the changeset viewer.