This commit is contained in:
Bob Mottram 2018-03-31 18:16:44 +01:00
parent 7d70a117fa
commit 25c70d0070
1 changed files with 18 additions and 18 deletions

View File

@ -38,10 +38,10 @@ BLUDIT_REPO="https://github.com/bludit/bludit"
BLUDIT_COMMIT='0e27e31a84421b3e6bd000a77bc89c2dff3c446a' BLUDIT_COMMIT='0e27e31a84421b3e6bd000a77bc89c2dff3c446a'
bludit_variables=(ONION_ONLY bludit_variables=(ONION_ONLY
BLUDIT_DOMAIN_NAME BLUDIT_DOMAIN_NAME
BLUDIT_CODE BLUDIT_CODE
DDNS_PROVIDER DDNS_PROVIDER
MY_USERNAME) MY_USERNAME)
function logging_on_bludit { function logging_on_bludit {
echo -n '' echo -n ''
@ -112,9 +112,9 @@ function configure_interactive_bludit {
esac esac
case $(cat "$data") in case $(cat "$data") in
1) # call some function for option 1 1) # call some function for option 1
;; ;;
2) # call some function for option 2 2) # call some function for option 2
;; ;;
3) rm -f "$data" 3) rm -f "$data"
break;; break;;
esac esac
@ -255,19 +255,19 @@ function install_bludit {
if [ -d "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" ]; then if [ -d "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" ]; then
rm -rf "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" rm -rf "/var/www/$BLUDIT_DOMAIN_NAME/htdocs"
fi fi
if [ -d /repos/bludit ]; then if [ -d /repos/bludit ]; then
mkdir "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" mkdir "/var/www/$BLUDIT_DOMAIN_NAME/htdocs"
cp -r -p /repos/bludit/. "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" cp -r -p /repos/bludit/. "/var/www/$BLUDIT_DOMAIN_NAME/htdocs"
cd "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" || exit 324687356 cd "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" || exit 324687356
git pull git pull
else else
git_clone $BLUDIT_REPO "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" git_clone $BLUDIT_REPO "/var/www/$BLUDIT_DOMAIN_NAME/htdocs"
fi fi
if [ ! -d "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" ]; then if [ ! -d "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" ]; then
echo $'Unable to clone bludit repo' echo $'Unable to clone bludit repo'
exit 87525 exit 87525
fi fi
cd "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" || exit 36587356 cd "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" || exit 36587356
git checkout $BLUDIT_COMMIT -b $BLUDIT_COMMIT git checkout $BLUDIT_COMMIT -b $BLUDIT_COMMIT