46
46
# ## --which=<parts> Controls which, comma-separated, parts 'rsc config' and
47
47
# ## 'rsc reset' report on and reset, respectively, where
48
48
# ## 'rsc' specifies the RSC configuration, 'rstudio' the
49
- # ## RStudio configuration, and 'user ' on the RStudio user
50
- # ## settings
49
+ # ## RStudio configuration, and 'sessions ' on the RStudio
50
+ # ## sessions storage
51
51
# ## ---
52
52
# ##
53
53
# ## Example:
65
65
# ## rsc stop
66
66
# ##
67
67
# ## rsc config
68
- # ## rsc config --which=rsc,rstudio,user (default)
68
+ # ## rsc config --which=rsc,rstudio,sessions (default)
69
69
# ## rsc config --full
70
70
# ## rsc config --which=rstudio --full
71
71
# ## rsc log
72
72
# ##
73
73
# ## rsc reset
74
- # ## rsc reset --which=rsc (default)
74
+ # ## rsc reset --which=rsc (default)
75
75
# ## rsc reset --force
76
- # ## rsc reset --which=user
76
+ # ## rsc reset --which=session
77
77
# ##
78
- # ## Version: 0.16.2-9007
78
+ # ## Version: 0.16.2-9008
79
79
# ## Copyright: Henrik Bengtsson (2022-2024) and Harry Putnam (2022)
80
80
# ## License: ISC
81
81
@@ -1521,7 +1521,7 @@ parse_opt_which() {
1521
1521
fi
1522
1522
for part in " ${parts[@]} " ; do
1523
1523
case " ${part} " in
1524
- " rsc" | " rstudio" | " user " )
1524
+ " rsc" | " rstudio" | " sessions " )
1525
1525
;;
1526
1526
* )
1527
1527
error " Unknown value of --which=<values> option: ${1} "
@@ -1552,9 +1552,9 @@ while [[ $# -gt 0 ]]; do
1552
1552
fi
1553
1553
elif [[ " $1 " == " config" ]]; then
1554
1554
action=" $1 "
1555
- # # 'rsc config' defaults to --which="rsc,rstudio,user "
1555
+ # # 'rsc config' defaults to --which="rsc,rstudio,sessions "
1556
1556
if [[ ${# which[@]} -eq 0 ]]; then
1557
- which=(rsc rstudio user )
1557
+ which=(rsc rstudio sessions )
1558
1558
fi
1559
1559
elif [[ " $1 " == " log" ]]; then
1560
1560
action=" $1 "
@@ -1709,7 +1709,10 @@ if [[ "${action}" == "config" ]]; then
1709
1709
for what in " ${which[@]} " ; do
1710
1710
if [[ ${what} == " rsc" ]]; then
1711
1711
files=()
1712
-
1712
+
1713
+ echo " ==========================================================="
1714
+ echo " RStudio Server Controller"
1715
+ echo " ==========================================================="
1713
1716
echo " RStudio Server Controller Settings:"
1714
1717
echo " RSC_AUTH: ${RSC_AUTH:- <not set>} "
1715
1718
echo " RSC_ENV_PATTERN: ${RSC_ENV_PATTERN:- <not set>} "
@@ -1777,7 +1780,9 @@ if [[ "${action}" == "config" ]]; then
1777
1780
done
1778
1781
fi
1779
1782
elif [[ ${what} == " rstudio" ]]; then
1780
- echo " RStudio User Configuration:"
1783
+ echo " ==========================================================="
1784
+ echo " RStudio User Configuration"
1785
+ echo " ==========================================================="
1781
1786
echo " XDG_CONFIG_HOME: ${XDG_CONFIG_HOME:- <not set>} "
1782
1787
echo " RSTUDIO_CONFIG_HOME: ${RSTUDIO_CONFIG_HOME:- <not set>} "
1783
1788
workdir=$( rstudio_config_home)
@@ -1786,9 +1791,12 @@ if [[ "${action}" == "config" ]]; then
1786
1791
echo " RStudio user preferences: ${file} [$( file_info " ${file} " ) ]"
1787
1792
if $full && [[ -f " ${file} " ]]; then
1788
1793
cat " ${file} "
1794
+ echo
1789
1795
fi
1790
- elif [[ ${what} == " user" ]]; then
1791
- echo " RStudio User State Storage:"
1796
+ elif [[ ${what} == " sessions" ]]; then
1797
+ echo " ==========================================================="
1798
+ echo " RStudio User Sessions"
1799
+ echo " ==========================================================="
1792
1800
echo " XDG_DATA_HOME: ${XDG_DATA_HOME:- <not set>} "
1793
1801
echo " RSTUDIO_DATA_HOME: ${RSTUDIO_DATA_HOME:- <not set>} "
1794
1802
workdir=$( rstudio_data_home)
@@ -1915,20 +1923,20 @@ elif [[ "${action}" == "reset" ]]; then
1915
1923
fi
1916
1924
elif [[ ${what} == " rstudio" ]]; then
1917
1925
error " rsc reset --which=${what} is not supported"
1918
- elif [[ ${what} == " user " ]]; then
1926
+ elif [[ ${what} == " sessions " ]]; then
1919
1927
# # Reset the RStudio User State Storage?
1920
1928
workdir=$( rstudio_data_home)
1921
1929
if [[ -d " ${workdir} " ]]; then
1922
1930
now=$( date +" %Y%m%dT%H%M%S" )
1923
1931
dest=" rstudio-config_${now} .tar"
1924
1932
tar -c -f " ${dest} " " ${workdir} "
1925
1933
if [[ -f " ${dest} " ]]; then
1926
- message " Backed up your personal RStudio User State Storage : ${PWD} /${dest} [$( file_info " ${dest} " ) ]"
1934
+ message " Backed up your personal RStudio sessions storage : ${PWD} /${dest} [$( file_info " ${dest} " ) ]"
1927
1935
rm -r -f " ${workdir} "
1928
- message " Removed your personal RStudio User State Storage : ${workdir} "
1936
+ message " Removed your personal RStudio sessions storage : ${workdir} "
1929
1937
fi
1930
1938
else
1931
- message " Nothing to do - RStudio User State Storage folder does not exist: ${workdir} "
1939
+ message " Nothing to do - RStudio sessions storage folder does not exist: ${workdir} "
1932
1940
fi
1933
1941
fi
1934
1942
done
0 commit comments