From 4a040e2c7c5c073fc46328f913306feffca5011d Mon Sep 17 00:00:00 2001 From: ezraholm50 Date: Sun, 11 Jun 2017 21:36:09 +0200 Subject: [PATCH] 1.4 --- README.md | 1 - apps/collabora.sh | 2 +- nextcloud-startup-script.sh | 20 ---------------- static/nextberry-upgrade.sh | 48 ++++++++++++++++++++++++++++++++++--- static/nextcloud.sh | 1 + version | 2 +- 6 files changed, 48 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 5d1165b5c0..1de5fc1ef9 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ ## Image * [Image link](https://github.com/techandme/NextBerry/releases/tag/Images) -* [Image mirror](https://cloud.techandme.se/s/G6PaI0miBibhDwj) ## Documentation [How to](https://github.com/techandme/NextBerry/wiki) diff --git a/apps/collabora.sh b/apps/collabora.sh index 9e7c177a3e..5645104796 100644 --- a/apps/collabora.sh +++ b/apps/collabora.sh @@ -35,7 +35,7 @@ fi whiptail --msgbox "Please before you start, make sure that port 443 is directly forwarded to this machine!" "$WT_HEIGHT" "$WT_WIDTH" # Get the latest packages -apt update -q4 & spinner_loading +"$APT" update -q4 & spinner_loading # Check if Nextcloud is installed echo "Checking if Nextcloud is installed..." diff --git a/nextcloud-startup-script.sh b/nextcloud-startup-script.sh index 7f81c7a985..141ee7d19b 100644 --- a/nextcloud-startup-script.sh +++ b/nextcloud-startup-script.sh @@ -484,10 +484,6 @@ PW=$(cat /root/.tmp) sed -i "s|$PW|XXX-SQL-PASS-XXX|g" "$SCRIPTS"/logs rm /root/.tmp -# Make sure 000-default is disabled -a2dissite 000-default.conf -service apache2 restart - # Log file echo "pastebinit -i $SCRIPTS/logs -a nextberry_$DATE -b paste.ubuntu.com > $SCRIPTS/.pastebinit" > /usr/sbin/install-log echo "clear" >> /usr/sbin/install-log @@ -496,22 +492,6 @@ chmod 750 /usr/sbin/install-log chown ncadmin "$SCRIPTS/logs" chmod 750 "$SCRIPTS/logs" -# Activate ssl in menu -echo "exec sudo $SCRIPTS/activate-ssl.sh" > /usr/sbin/activate-ssl -chmod +x /usr/sbin/activate-ssl - -# Menu toggle -cat << TOGGLE > "/usr/sbin/menu-toggle" -if [ -f "$SCRIPTS"/.menu ] -then - rm "$SCRIPTS"/.menu -else - touch "$SCRIPTS"/.menu -fi -exec "$SCRIPTS"/nextcloud.sh -TOGGLE -chmod +x /usr/sbin/menu-toggle - # Reboot any_key "Installation finished, press any key to reboot system..." rm -f "$SCRIPTS/nextcloud-startup-script.sh" diff --git a/static/nextberry-upgrade.sh b/static/nextberry-upgrade.sh index 1e9deae9f9..2b8bdfdfe1 100644 --- a/static/nextberry-upgrade.sh +++ b/static/nextberry-upgrade.sh @@ -167,9 +167,51 @@ echo "13 applied" >> "$VERSIONFILE" # Change current version var sed -i 's|012|013|g' "$VERSIONFILE" sed -i 's|V1.2|V1.3|g' "$VERSIONFILE" - -# Done - Move this line to the new release on every new version. -whiptail --msgbox "Successfully installed V1.3, please manually reboot..." 10 65 fi +################### V1.4 #################### +if grep -q "14 applied" "$VERSIONFILE"; then + echo "14 already applied..." +else + + # New login screen + if [ ! -f "$SCRIPTS/nextcloud.sh" ] + then + rm "$SCRIPTS"/nextcloud.sh + wget -q "$STATIC"/nextcloud.sh -P "$SCRIPTS" + chmod +x "$STATIC"/nextcloud.sh + else + wget -q "$STATIC"/nextcloud.sh -P "$SCRIPTS" + chmod +x "$STATIC"/nextcloud.sh + fi + + # Activate ssl in menu + echo "exec sudo $SCRIPTS/activate-ssl.sh" > /usr/sbin/activate-ssl + chmod +x /usr/sbin/activate-ssl + + # Menu toggle + cat << TOGGLE > "/usr/sbin/menu-toggle" + if [ -f "$SCRIPTS"/.menu ] + then + rm "$SCRIPTS"/.menu + else + touch "$SCRIPTS"/.menu + fi + exec "$SCRIPTS"/nextcloud.sh + TOGGLE + chmod +x /usr/sbin/menu-toggle + + # Make sure 000-default is disabled + a2dissite 000-default.conf + service apache2 restart + + # Set what version is installed + echo "14 applied" >> "$VERSIONFILE" + # Change current version var + sed -i 's|013|014|g' "$VERSIONFILE" + sed -i 's|V1.3|V1.4|g' "$VERSIONFILE" + + # Done - Move this line to the new release on every new version. + whiptail --msgbox "Successfully installed V1.3, please manually reboot..." 10 65 +fi exit diff --git a/static/nextcloud.sh b/static/nextcloud.sh index 49b3a24656..d5168997fc 100644 --- a/static/nextcloud.sh +++ b/static/nextcloud.sh @@ -63,6 +63,7 @@ echo -e "$COLOR_WHITE To auto install Letsencrypt certs, type: $COLOR_PURPL echo -e "$COLOR_WHITE To view RPI config settings, type: $COLOR_PURPLE sudo rpi-conf $COLOR_DEFAULT" echo -e "$COLOR_WHITE To monitor your system, type: $COLOR_PURPLE sudo htop $COLOR_DEFAULT" echo -e "$COLOR_WHITE $COLOR_PURPLE sudo fs-size $COLOR_DEFAULT" +echo -e "$COLOR_WHITE To view advanced config, type: $COLOR_PURPLE sudo raspi-config $COLOR_DEFAULT" fi echo -e "$COLOR_WHITE Toggle this menu on and of: $COLOR_PURPLE sudo menu-toggle $COLOR_DEFAULT" # Log file check diff --git a/version b/version index 1104187a06..81c9fd4dba 100644 --- a/version +++ b/version @@ -1 +1 @@ -013 +014