From 0ae43511cfd7a1fc38c41319879ba76341a3f1ec Mon Sep 17 00:00:00 2001 From: poka Date: Wed, 20 May 2020 21:09:22 +0200 Subject: [PATCH] Add options to install --- .install/nextcloud/install.sh | 2 ++ install.sh | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.install/nextcloud/install.sh b/.install/nextcloud/install.sh index 3de6d20..153fd63 100755 --- a/.install/nextcloud/install.sh +++ b/.install/nextcloud/install.sh @@ -170,6 +170,8 @@ alias occ='/opt/scripts/occ' [[ -z $(crontab -l | grep "/var/www/nextcloud/cron.php") ]] && (crontab -l ; echo "*/5 * * * * sudo -u www-data /usr/bin/php -f /var/www/nextcloud/cron.php > /dev/null 2>&1") | crontab -u root - || echo "cron nextcloud ever set, skip" [[ -z $(crontab -l | grep "/opt/scripts/optimize.sh") ]] && (crontab -l ; echo "5 1 * * * /opt/scripts/optimize.sh > /dev/null 2>&1") | crontab -u root - || echo "cron optimize ever set, skip" sudo -u www-data php /var/www/nextcloud/occ background:cron +sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices +sudo -u www-data php /var/www/nextcloud/occ db:convert-filecache-bigint echo -e "${c_yellow} === Restarting services ... ===$c_" service php-fpm restart && service nginx restart && service mysql restart && service redis-server restart || (echo -e "${c_red}Impossible de reloader les service$c_" && exit 1) diff --git a/install.sh b/install.sh index 74664df..6b06bee 100644 --- a/install.sh +++ b/install.sh @@ -1,8 +1,7 @@ #!/bin/bash -# Check requierments { - +# Check requierments sudo apt update sudo apt install curl net-tools -y @@ -13,6 +12,9 @@ curl -s $gitpath/.install/export_colors.sh | bash || exit 1 [[ -n $(grep ".bash_aliases" ~/.bashrc) ]] && echo ". ~/.bash_aliases" ~/.bashrc . ~/.bash_aliases +# Get arguments +args="$@" + # IPFS install echo -e "${c_green}Astroport installer ### @@ -28,6 +30,9 @@ echo -e "${c_green}2. Ḡ1/ScuttleButt anoptical layer$c_" # ONCE YOU READ and AGREE. Run TrustFull QUICK Install !! curl -s $gitpath/zen/tools/make_G1SSB_secret.sh | bash || exit 1 +cd $YOU/.zen/astroport +[[ $args =~ nextcloud ]] && sudo -E bash .install/nextcloud/install.sh + echo -e "${c_green}Installation complete$c_" exec bash