]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/dinstall.functions
We really don't want environment variables to cause us to drop the wrong damn database
[dak.git] / config / debian / dinstall.functions
index a29ae26eb0faaf44219e119f79c2bc272c49be4b..fc6ad4737fe1950aaa334bc7fc2ef449baba155e 100644 (file)
@@ -53,11 +53,21 @@ function pgdump_post() {
 
 # Load the dak-dev projectb
 function pgdakdev() {
+    # Make sure to unset any possible psql variables so we don't drop the wrong
+    # f****** database by accident
+    local PGDATABASE
+    unset PGDATABASE
+    local PGHOST
+    unset PGHOST
+    local PGPORT
+    unset PGPORT
+    local PGUSER
+    unset PGUSER
     cd $base/backup
-    echo "drop database projectb" | psql -p 5433 template1
+    echo "drop database projectb" | psql -p 5434 template1
        #cat currentall | psql -p 5433 template1
-    createdb -p 5433 -T template1 projectb
-    fgrep -v '\connect' current | psql -p 5433 projectb
+    createdb -p 5434 -T template1 projectb
+    fgrep -v '\connect' current | psql -p 5434 projectb
 }
 
 # Updating various files
@@ -472,9 +482,9 @@ function merkel3() {
 
 function mirrorpush() {
     log "Starting the mirrorpush"
-    date -u > /srv/ftp-master.debian.org/web/mirrorstart
-    echo "Using dak v1" >> /srv/ftp-master.debian.org/web/mirrorstart
-    echo "Running on host $(hostname -f)" >> /srv/ftp-master.debian.org/web/mirrorstart
+    date -u > /srv/ftp.debian.org/web/mirrorstart
+    echo "Using dak v1" >> /srv/ftp.debian.org/web/mirrorstart
+    echo "Running on host $(hostname -f)" >> /srv/ftp.debian.org/web/mirrorstart
     sudo -H -u archvsync /home/archvsync/runmirrors > ~dak/runmirrors.log 2>&1 &
 }