Jelajahi Sumber

Update and rename nextcloudpi-install.sh to nextcloudpi-v5-install.sh

tteckster 2 tahun lalu
induk
melakukan
31db188cca
1 mengubah file dengan 9 tambahan dan 9 penghapusan
  1. 9 9
      install/nextcloudpi-v5-install.sh

+ 9 - 9
install/nextcloudpi-install.sh → install/nextcloudpi-v5-install.sh

@@ -19,7 +19,7 @@ set -o pipefail
 shopt -s expand_aliases
 alias die='EXIT=$? LINE=$LINENO error_exit'
 trap die ERR
-
+silent() { "$@" > /dev/null 2>&1; }
 function error_exit() {
   trap - ERR
   local reason="Unknown failure occurred."
@@ -76,19 +76,19 @@ alias die='EXIT=$? LINE=$LINENO error_exit'
 set -e
 
 msg_info "Updating Container OS"
-apt-get update &>/dev/null
-apt-get -y upgrade &>/dev/null
+$STD apt-get update
+$STD apt-get -y upgrade
 msg_ok "Updated Container OS"
 
 msg_info "Installing Dependencies"
-apt-get install -y curl &>/dev/null
-apt-get install -y sudo &>/dev/null
+$STD apt-get install -y curl
+$STD apt-get install -y sudo
 msg_ok "Installed Dependencies"
 
 msg_info "Installing NextCloudPi (Patience)"
-curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash &>/dev/null
+$STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh)
 sed -i "s/3 => 'nextcloudpi.lan',/3 => '0.0.0.0',/g" /var/www/nextcloud/config/config.php
-sudo service apache2 restart
+service apache2 restart
 msg_ok "Installed NextCloudPi"
 
 PASS=$(grep -w "root" /etc/shadow | cut -b6)
@@ -113,6 +113,6 @@ if [[ "${SSH_ROOT}" == "yes" ]]; then
 fi
 
 msg_info "Cleaning up"
-apt-get autoremove >/dev/null
-apt-get autoclean >/dev/null
+$STD apt-get autoremove
+$STD apt-get autoclean
 msg_ok "Cleaned"