Skip to content

Commit

Permalink
fixed windows lineendings
Browse files Browse the repository at this point in the history
  • Loading branch information
joschli committed Mar 20, 2016
1 parent 9fc52e2 commit fefd7b9
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 45 deletions.
15 changes: 15 additions & 0 deletions pkg/srv/install_scripts/full_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

chmod +x setup_user_postgis.sh
chmod +x move_postgres.sh
chmod +x setup_styles.sh
chmod +x setup_dataset.sh
chmod +x setup_apache.sh
chmod +x load_mod_tile.sh

./setup_user_postgis.sh
./move_postgres.sh
./setup_styles.sh
./setup_datset.sh
./setup_apache.sh
./load_mod_tile.sh
64 changes: 31 additions & 33 deletions pkg/srv/install_scripts/move_postgres.sh
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
#!/bin/bash

NEW_PATH="/srv/postgresql"
OLD_PATH="/var/lib/postgresql/9.4/main"
FILE_PATH="/etc/postgresql/9.4/main/postgresql.conf"

# REMOVE OLD DIRS
rm -rf /srv/

# STOP SERVICES
systemctl stop postgresql

# CHANGE POSTGRES DIRECTORY
sed -i "s|$OLD_PATH|$NEW_PATH|g" $FILE_PATH

# CREATE STRUCTURE
mkdir -p /srv/postgresql
mkdir /srv/styles
mkdir /srv/planet

# COPY POSTGRESQL
cp -r $OLD_PATH/. $NEW_PATH/

# FIX PERMISSIONS
chown -R postgres:postgres /srv/postgresql/
chmod 700 /srv/postgresql/



# START SERVICES
systemctl start postgresql


#!/bin/bash

NEW_PATH="/srv/postgresql"
OLD_PATH="/var/lib/postgresql/9.4/main"
FILE_PATH="/etc/postgresql/9.4/main/postgresql.conf"

# REMOVE OLD DIRS
rm -rf /srv/postgresql

# STOP SERVICES
systemctl stop postgresql

# CHANGE POSTGRES DIRECTORY
sed -i "s|$OLD_PATH|$NEW_PATH|g" $FILE_PATH

# CREATE STRUCTURE
mkdir -p /srv/postgresql

# COPY POSTGRESQL
cp -r $OLD_PATH/. $NEW_PATH/

# FIX PERMISSIONS
chown -R postgres:postgres /srv/postgresql/
chmod 700 /srv/postgresql/



# START SERVICES
systemctl start postgresql


22 changes: 11 additions & 11 deletions pkg/srv/install_scripts/setup_user_postgis.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

DATABASE_NAME="gis"

# SETUP USER FOR DB
sudo -u postgres createuser algogis
sudo -u postgres createdb -E UTF8 -O algogis gis
useradd -m algogis

# SETUP DB
sudo -u postgres psql $DATABASE_NAME -c 'CREATE EXTENSION postgis;ALTER TABLE geometry_columns OWNER TO algogis; ALTER TABLE spatial_ref_sys OWNER TO algogis;'
#!/bin/bash

DATABASE_NAME="gis"

# SETUP USER FOR DB
sudo -u postgres createuser algogis
sudo -u postgres createdb -E UTF8 -O algogis gis
useradd -m algogis

# SETUP DB
sudo -u postgres psql $DATABASE_NAME -c 'CREATE EXTENSION postgis;ALTER TABLE geometry_columns OWNER TO algogis; ALTER TABLE spatial_ref_sys OWNER TO algogis;'
5 changes: 4 additions & 1 deletion rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ cd mod_tile
make -j12
cd ../../
#-- copy things to pkg
rm -rf pkg/
rm -rf pkg/install_pkg
rm -rf pkg/usr
mkdir -p pkg/usr/local/share/osm2pgsql/
mkdir -p pkg/usr/local/bin/
mkdir -p pkg/install_pkg
cp -r build/mapnik pkg/install_pkg/mapnik
cp -r build/mod_tile pkg/install_pkg/mod_tile
cp -r build/osm2pgsql/build/osm2pgsql pkg/usr/local/bin/osm2pgsql
cp -r build/osm2pgsql/default.style pkg/usr/local/share/osm2pgsql/
chmod +x pkg/usr/local/bin/osm2pgsql
chmod +x hooks/after-install.sh

Expand Down

0 comments on commit fefd7b9

Please sign in to comment.