Improve script-system-update-r
This commit is contained in:
@@ -40,7 +40,8 @@ Last updated: 2021-10-22
|
|||||||
- [Allow access to the samba share within the Windows VM (Windows bug workaround)](#allow-access-to-the-samba-share-within-the-windows-vm-windows-bug-workaround)
|
- [Allow access to the samba share within the Windows VM (Windows bug workaround)](#allow-access-to-the-samba-share-within-the-windows-vm-windows-bug-workaround)
|
||||||
- [Make an existing Windows 10 account user an administrator](#make-an-existing-windows-10-account-user-an-administrator)
|
- [Make an existing Windows 10 account user an administrator](#make-an-existing-windows-10-account-user-an-administrator)
|
||||||
- [Creating more VM disk space](#creating-more-vm-disk-space)
|
- [Creating more VM disk space](#creating-more-vm-disk-space)
|
||||||
- [Updating all software](#updating-all-software)
|
- [Updating system software](#updating-system-software)
|
||||||
|
- [Updating RStudio and RStudio Server](#updating-rstudio-and-rstudio-server)
|
||||||
- [Scheduling a restart](#scheduling-a-restart)
|
- [Scheduling a restart](#scheduling-a-restart)
|
||||||
- [Adding a drive](#adding-a-drive)
|
- [Adding a drive](#adding-a-drive)
|
||||||
- [Logging](#logging)
|
- [Logging](#logging)
|
||||||
@@ -297,12 +298,16 @@ Once configured, the user will no longer need to enter their password to access
|
|||||||
- Add 20 GBs of space to the Windows VM: `sudo qemu-img resize /var/lib/libvirt/images/win10-5900.qcow2 +20G`
|
- Add 20 GBs of space to the Windows VM: `sudo qemu-img resize /var/lib/libvirt/images/win10-5900.qcow2 +20G`
|
||||||
- Add [gparted iso](/media/share/documentation) as boot device and expand working partition.
|
- Add [gparted iso](/media/share/documentation) as boot device and expand working partition.
|
||||||
|
|
||||||
### Updating all software
|
### Updating system software
|
||||||
|
|
||||||
- `script-system-update`
|
- `script-system-update`
|
||||||
- The server regularly installs security updates unattended
|
- The server regularly installs security updates unattended
|
||||||
- If the kernel, java, systemd, or other major components are updated, the system should be restarted.
|
- If the kernel, java, systemd, or other major components are updated, the system should be restarted.
|
||||||
|
|
||||||
|
### Updating RStudio and RStudio Server
|
||||||
|
|
||||||
|
-`script-system-update-r`
|
||||||
|
|
||||||
### Scheduling a restart
|
### Scheduling a restart
|
||||||
|
|
||||||
- `script-system-scheduled-restart` *`OnCalendar`*
|
- `script-system-scheduled-restart` *`OnCalendar`*
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Update the R binaries and RStudio-R4 application meny entry
|
# Update the R binaries and RStudio-R4 application meny entry
|
||||||
|
# $1: Version number ex. '2021.09.1-372'
|
||||||
# Copyright 2021 Bryan C. Roessler
|
# Copyright 2021 Bryan C. Roessler
|
||||||
|
|
||||||
parent="${BASH_SOURCE[0]}"
|
parent="${BASH_SOURCE[0]}"
|
||||||
@@ -9,16 +10,24 @@ parent=${parent%/*}
|
|||||||
|
|
||||||
is_root
|
is_root
|
||||||
|
|
||||||
[[ $# -ne 1 ]] && echo "Missing R version argument." && exit 1
|
if [[ $# -ne 1 ]]; then
|
||||||
|
echo "Missing R version argument."
|
||||||
|
echo "Example: '2021.09.1-372'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
ask_ok "RStudio-R4 to version $1?" || exit $?
|
ask_ok "RStudio-R4 to version $1?" || exit $?
|
||||||
|
|
||||||
sudo dnf install -y "https://cdn.rstudio.com/r/centos-7/pkgs/R-${1}-1-1.x86_64.rpm"
|
sudo dnf install -y "https://cdn.rstudio.com/r/centos-7/pkgs/R-${1}-1-1.x86_64.rpm" \
|
||||||
|
"https://download2.rstudio.org/server/centos7/x86_64/rstudio-server-rhel-${1}-x86_64.rpm"
|
||||||
|
|
||||||
desktop_file="/usr/share/applications/rstudio-4.desktop"
|
|
||||||
|
|
||||||
|
|
||||||
|
desktop_file="/usr/share/applications/rstudio-R4.desktop"
|
||||||
|
|
||||||
[[ ! -f "$desktop_file" ]] && exit 1
|
[[ ! -f "$desktop_file" ]] && exit 1
|
||||||
|
|
||||||
sed -i "s|/opt/R/.*/bin/R|/opt/R/$1/bin/R|" "$desktop_file"
|
sed -i "s|/opt/R/.*/bin/R|/opt/R/$1/bin/R|" "$desktop_file"
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
Reference in New Issue
Block a user