Add options to install

This commit is contained in:
poka 2020-05-20 21:09:22 +02:00
parent 4cdc9bec9a
commit 0ae43511cf
2 changed files with 9 additions and 2 deletions

View File

@ -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)

View File

@ -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