From 34d06ec37b41683fa67773b7539451daa61fa72b Mon Sep 17 00:00:00 2001 From: John Dulaney Date: Tue, 15 Dec 2015 17:29:20 -0500 Subject: [PATCH] Add gnu-social bits Signed-off-by: John Dulaney --- class/50-host-classes | 2 +- scripts/GNUSOCIAL/10_download_gnusocial.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 scripts/GNUSOCIAL/10_download_gnusocial.sh diff --git a/class/50-host-classes b/class/50-host-classes index 6a05aed..572f74e 100755 --- a/class/50-host-classes +++ b/class/50-host-classes @@ -69,7 +69,7 @@ case $HOSTNAME in echo "FAIBASE WWW CIVICRM SYSADMIN VM MYSQLD" ;; gnusocial*) - echo "FAIBASE WWW SYSADMIN VM MYSQLD" + echo "FAIBASE WWW SYSADMIN VM MYSQLD GNUSOCIAL" ;; nagios*) echo "FAIBASE SYSADMIN VM MYSQLD NAGIOS WWW" diff --git a/scripts/GNUSOCIAL/10_download_gnusocial.sh b/scripts/GNUSOCIAL/10_download_gnusocial.sh new file mode 100644 index 0000000..d173de6 --- /dev/null +++ b/scripts/GNUSOCIAL/10_download_gnusocial.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +# Download gnusocial directly from their download source, as it is the recommended route and there is no repo +if ! $ROOTCMD getent passwd gnusocial ; then + $ROOTCMD adduser --system --ingroup www-data --disabled-password --gecos "gnusocial user" gnusocial +fi + +if ! $ROOTCMD test -e /home/gnusocial/.ssh/id_rsa; then + $ROOTCMD echo | $ROOTCMD sudo -u gnusocial ssh-keygen -N '' +fi + +if ! $ROOTCMD echo | cd /home/gnusocial/ + git clone https://git.gnu.io/gnu/gnu-social.git /home/gnusocial/gnu-social; then + rm -rf /home/gnusocial/gnu-social/.git + mv /home/gnusocial/gnu-social/* /var/www/html +fi -- 2.25.1