File tree Expand file tree Collapse file tree 10 files changed +80
-21
lines changed Expand file tree Collapse file tree 10 files changed +80
-21
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ function nextcloud-config()
4949 [[ $? -ne $DIALOG_OK ]] || [[ " $script " == " " ]] && return 0
5050
5151 # launch selected script
52+ info_script $script .sh || return 1;
5253 configure_script $script .sh
5354}
5455
Original file line number Diff line number Diff line change @@ -215,6 +215,18 @@ function install_script()
215215 )
216216}
217217
218+ function info_script()
219+ {
220+ (
221+ local SCRIPT=$1
222+ cd /usr/local/etc/nextcloudpi-config.d/
223+ unset show_info
224+ source ./$SCRIPT
225+ [[ $( type -t show_info ) == function ]] || return 0
226+ [[ $( type -t show_info ) == function ]] && show_info
227+ )
228+ }
229+
218230function configure_script()
219231{
220232 (
Original file line number Diff line number Diff line change @@ -27,19 +27,20 @@ install()
2727 systemctl disable nfs-kernel-server
2828}
2929
30- configure ()
30+ show_info ()
3131{
32- # INFO
33- # ###############################
34- whiptail --msgbox \
32+ whiptail --yesno \
3533 --backtitle " NextCloudPi configuration" \
3634 --title " Instructions for external synchronization" \
3735" If we intend to modify the data folder through NFS,
3836then we have to synchronize NextCloud to make it aware of the changes. \n
3937This can be done manually or automatically using 'nc-scan' and 'nc-scan-auto'
4038from 'nextcloudpi-config'" \
4139 20 90
40+ }
4241
42+ configure ()
43+ {
4344 # CHECKS
4445 # ###############################
4546 [ -d " $DIR_ " ] || { echo -e " INFO: directory $DIR_ does not exist. Creating" ; mkdir -p " $DIR_ " ; }
Original file line number Diff line number Diff line change @@ -26,6 +26,15 @@ install()
2626 /etc/letsencrypt/letsencrypt-auto --help # do not actually run certbot, only install packages
2727}
2828
29+ show_info ()
30+ {
31+ whiptail --yesno \
32+ --backtitle " NextCloudPi configuration" \
33+ --title " Warning" \
34+ " Internet access is required for this configuration to complete" \
35+ 20 90
36+ }
37+
2938# tested with git version v0.11.0-71-g018a304
3039configure ()
3140{
Original file line number Diff line number Diff line change 8888EOF
8989}
9090
91+ show_info ()
92+ {
93+ whiptail --yesno \
94+ --backtitle " NextCloudPi configuration" \
95+ --title " Experimental feature warning" \
96+ " This feature is highly experimental and has only been tested with
97+ a basic NextCloud installation. If a new App does not work disable it" \
98+ 20 90
99+ }
100+
91101configure ()
92102{
93103 [[ $ACTIVE_ == " yes" ]] && local STATE=On || local STATE=Off
Original file line number Diff line number Diff line change 1818ACTIVE_=no
1919DESCRIPTION=" mount logs in RAM to prevent SD card degradation (faster, consumes more RAM)"
2020
21+ show_info ()
22+ {
23+ whiptail --yesno \
24+ --backtitle " NextCloudPi configuration" \
25+ --title " Warning" \
26+ " If you are installing software other than NextCloud
27+ that creates folders under '/var/log/' disable this feature" \
28+ 20 90
29+ }
30+
2131configure ()
2232{
2333 [[ $ACTIVE_ != " yes" ]] && {
Original file line number Diff line number Diff line change 1717SCANINTERVAL_=60
1818DESCRIPTION=" Periodically scan NC for externally modified files"
1919
20- configure ()
20+ show_info ()
2121{
22- whiptail --msgbox \
22+ whiptail --yesno \
2323 --backtitle " NextCloudPi configuration" \
2424 --title " Instructions for auto synchronization" \
2525" Set the time in minutes in SCANINTERVAL. \n
2626>>> If there are too many files this can greatly affect performance. <<< \n
2727SCANINTERVAL=0 will disable periodic synchronization." \
2828 20 90
29+ }
2930
31+ configure ()
32+ {
3033 [[ $SCANINTERVAL_ == 0 ]] && {
3134 systemctl stop nc-scan.timer
3235 systemctl disable nc-scan.timer
Original file line number Diff line number Diff line change @@ -24,6 +24,20 @@ install()
2424 systemctl disable wicd
2525}
2626
27+ show_info ()
28+ {
29+ whiptail --yesno \
30+ --backtitle " NextCloudPi configuration" \
31+ --title " Instructions to configure Wi-Fi" \
32+ " 1) Select a Wi-Fi network
33+ 2) Press right arrow ->
34+ 3) Enter the passphrase for your Wi-Fi
35+ 4) Make sure to select 'connect automatically'
36+ 5) F10 to save
37+ 6) C to connect" \
38+ 20 90
39+ }
40+
2741configure ()
2842{
2943 # Installation in QEMU (without a wireless interface) produces
@@ -41,17 +55,6 @@ configure()
4155 systemctl enable wicd
4256 systemctl start wicd
4357
44- whiptail --msgbox \
45- --backtitle " NextCloudPi configuration" \
46- --title " Instructions to configure Wi-Fi" \
47- " 1) Select a Wi-Fi network
48- 2) Press right arrow ->
49- 3) Enter the passphrase for your Wi-Fi
50- 4) Make sure to select 'connect automatically'
51- 5) F10 to save
52- 6) C to connect" \
53- 20 90
54-
5558 wicd-curses
5659}
5760
Original file line number Diff line number Diff line change 5151 rm -r /tmp/noip
5252}
5353
54+ show_info ()
55+ {
56+ whiptail --yesno \
57+ --backtitle " NextCloudPi configuration" \
58+ --title " Warning" \
59+ " Internet access is required for this configuration to complete" \
60+ 20 90
61+ }
62+
5463configure ()
5564{
5665 [[ $ACTIVE_ == " no" ]] && { service noip2 stop; update-rc.d noip2 disable; return ; }
Original file line number Diff line number Diff line change @@ -29,19 +29,20 @@ install()
2929 grep -q mkdir /etc/init.d/smbd || sed -i " /\<start)/amkdir -p /var/log/samba" /etc/init.d/smbd
3030}
3131
32- configure ()
32+ show_info ()
3333{
34- # INFO
35- # ###############################
36- whiptail --msgbox \
34+ whiptail --yesno \
3735 --backtitle " NextCloudPi configuration" \
3836 --title " Instructions for external synchronization" \
3937" If we intend to modify the data folder through SAMBA,
4038then we have to synchronize NextCloud to make it aware of the changes. \n
4139This can be done manually or automatically using 'nc-scan' and 'nc-scan-auto'
4240from 'nextcloudpi-config'" \
4341 20 90
42+ }
4443
44+ configure ()
45+ {
4546 # CHECKS
4647 # ###############################
4748 [ -d " $DIR_ " ] || { echo -e " INFO: directory $DIR_ does not exist. Creating" ; mkdir -p " $DIR_ " ; }
You can’t perform that action at this time.
0 commit comments