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()
49
49
[[ $? -ne $DIALOG_OK ]] || [[ " $script " == " " ]] && return 0
50
50
51
51
# launch selected script
52
+ info_script $script .sh || return 1;
52
53
configure_script $script .sh
53
54
}
54
55
Original file line number Diff line number Diff line change @@ -215,6 +215,18 @@ function install_script()
215
215
)
216
216
}
217
217
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
+
218
230
function configure_script()
219
231
{
220
232
(
Original file line number Diff line number Diff line change @@ -27,19 +27,20 @@ install()
27
27
systemctl disable nfs-kernel-server
28
28
}
29
29
30
- configure ()
30
+ show_info ()
31
31
{
32
- # INFO
33
- # ###############################
34
- whiptail --msgbox \
32
+ whiptail --yesno \
35
33
--backtitle " NextCloudPi configuration" \
36
34
--title " Instructions for external synchronization" \
37
35
" If we intend to modify the data folder through NFS,
38
36
then we have to synchronize NextCloud to make it aware of the changes. \n
39
37
This can be done manually or automatically using 'nc-scan' and 'nc-scan-auto'
40
38
from 'nextcloudpi-config'" \
41
39
20 90
40
+ }
42
41
42
+ configure ()
43
+ {
43
44
# CHECKS
44
45
# ###############################
45
46
[ -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()
26
26
/etc/letsencrypt/letsencrypt-auto --help # do not actually run certbot, only install packages
27
27
}
28
28
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
+
29
38
# tested with git version v0.11.0-71-g018a304
30
39
configure ()
31
40
{
Original file line number Diff line number Diff line change 88
88
EOF
89
89
}
90
90
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
+
91
101
configure ()
92
102
{
93
103
[[ $ACTIVE_ == " yes" ]] && local STATE=On || local STATE=Off
Original file line number Diff line number Diff line change 18
18
ACTIVE_=no
19
19
DESCRIPTION=" mount logs in RAM to prevent SD card degradation (faster, consumes more RAM)"
20
20
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
+
21
31
configure ()
22
32
{
23
33
[[ $ACTIVE_ != " yes" ]] && {
Original file line number Diff line number Diff line change 17
17
SCANINTERVAL_=60
18
18
DESCRIPTION=" Periodically scan NC for externally modified files"
19
19
20
- configure ()
20
+ show_info ()
21
21
{
22
- whiptail --msgbox \
22
+ whiptail --yesno \
23
23
--backtitle " NextCloudPi configuration" \
24
24
--title " Instructions for auto synchronization" \
25
25
" Set the time in minutes in SCANINTERVAL. \n
26
26
>>> If there are too many files this can greatly affect performance. <<< \n
27
27
SCANINTERVAL=0 will disable periodic synchronization." \
28
28
20 90
29
+ }
29
30
31
+ configure ()
32
+ {
30
33
[[ $SCANINTERVAL_ == 0 ]] && {
31
34
systemctl stop nc-scan.timer
32
35
systemctl disable nc-scan.timer
Original file line number Diff line number Diff line change @@ -24,6 +24,20 @@ install()
24
24
systemctl disable wicd
25
25
}
26
26
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
+
27
41
configure ()
28
42
{
29
43
# Installation in QEMU (without a wireless interface) produces
@@ -41,17 +55,6 @@ configure()
41
55
systemctl enable wicd
42
56
systemctl start wicd
43
57
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
-
55
58
wicd-curses
56
59
}
57
60
Original file line number Diff line number Diff line change 51
51
rm -r /tmp/noip
52
52
}
53
53
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
+
54
63
configure ()
55
64
{
56
65
[[ $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()
29
29
grep -q mkdir /etc/init.d/smbd || sed -i " /\<start)/amkdir -p /var/log/samba" /etc/init.d/smbd
30
30
}
31
31
32
- configure ()
32
+ show_info ()
33
33
{
34
- # INFO
35
- # ###############################
36
- whiptail --msgbox \
34
+ whiptail --yesno \
37
35
--backtitle " NextCloudPi configuration" \
38
36
--title " Instructions for external synchronization" \
39
37
" If we intend to modify the data folder through SAMBA,
40
38
then we have to synchronize NextCloud to make it aware of the changes. \n
41
39
This can be done manually or automatically using 'nc-scan' and 'nc-scan-auto'
42
40
from 'nextcloudpi-config'" \
43
41
20 90
42
+ }
44
43
44
+ configure ()
45
+ {
45
46
# CHECKS
46
47
# ###############################
47
48
[ -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