Removed create psql user, movoed to init.d style install, changed install script...
authorLisa Marie Maginnis <lisam@fsf.org>
Sun, 28 Feb 2016 06:35:43 +0000 (01:35 -0500)
committerLisa Marie Maginnis <lisam@fsf.org>
Sun, 28 Feb 2016 06:35:43 +0000 (01:35 -0500)
files/etc/init.d/install-mediagoblin/DEFAULT [new file with mode: 0644]
scripts/GMG/00_create_psql_user.sh [deleted file]
scripts/GMG/10_create_dir.sh
scripts/GMG/15_install_gmg.sh

diff --git a/files/etc/init.d/install-mediagoblin/DEFAULT b/files/etc/init.d/install-mediagoblin/DEFAULT
new file mode 100644 (file)
index 0000000..dd7579e
--- /dev/null
@@ -0,0 +1,20 @@
+#/bin/bash
+
+cd "${GMG_PATH}"
+if [ ! -d mediagoblin ]; then
+
+    # Create the GMG user
+    sudo -u postgres createuser -A -D mediagoblin
+    # Crea te GMG database
+    sudo -u postgres createdb -E UNICODE -O mediagoblin mediagoblin
+
+    git clone git://git.savannah.gnu.org/mediagoblin.git -b stable
+
+    cd mediagoblin
+    git submodule init && git submodule update
+
+    ./bootstrap.sh && ./configure && make
+    mkdir user_dev && chmod 750 user_dev
+    ./bin/easy_install flup
+
+fi
diff --git a/scripts/GMG/00_create_psql_user.sh b/scripts/GMG/00_create_psql_user.sh
deleted file mode 100755 (executable)
index e124317..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-# Create the GMG user
-$ROOTCMD sudo -u postgres createuser -A -D mediagoblin
-# Create GMG database
-$ROOTCMD sudo -u postgres createdb -E UNICODE -O mediagoblin mediagoblin
-
-
index 045d5c071a9cfe860838b77a59b6f9aff4cd01d6..15a539d790e0a481b7e3c0306cd2967fa745a68c 100755 (executable)
@@ -1,4 +1,6 @@
 #!/bin/bash
 
 #!/bin/bash
 
-$ROOTCMD mkdir -p $GMG_PATH && $ROOTCMD chown -hR mediagoblin:www-data $GMG_PATH
+if [ ! -d $GMG_PATH ]; then
+    $ROOTCMD mkdir -p $GMG_PATH && $ROOTCMD chown -hR mediagoblin:www-data $GMG_PATH
+fi
 
 
index fc60f118e917670143a41ddef059d500347d2c51..ca3b00805d93b794afca56f3f0db2d1ebcc659be 100755 (executable)
@@ -1,17 +1,5 @@
 #!/bin/bash
 
 #!/bin/bash
 
-
-cd $target/$GMG_PATH
-if [ ! -d mediagoblin ]; then
-
-    $ROOTCMD git clone git://git.savannah.gnu.org/mediagoblin.git -b stable
-    $ROOTCMD cd mediagoblin
-    $ROOTCMD git submodule init && $ROOTCMD git submodule update
-
-
-    $ROOTCMD ./bootstrap.sh && $ROOTCMD ./configure && $ROOTCMD make
-    $ROOTCMD mkdir user_dev && $ROOTCMD chmod 750 user_dev
-    $ROOTCMD ./bin/easy_install flup
-
-fi
+fcopy -v /etc/init.d/
+$ROOTCMD update-rc.d mediagoblin defaults