File tree Expand file tree Collapse file tree 19 files changed +74
-178
lines changed Expand file tree Collapse file tree 19 files changed +74
-178
lines changed Original file line number Diff line number Diff line change 1
1
2
- [ v0.26.17] ( https://github.com/nextcloud/nextcloudpi/commit/a7bfd17 ) (2017-09-07) ncp-web: link to changelog
2
+ [ v0.26.18] ( https://github.com/nextcloud/nextcloudpi/commit/a4144dc ) (2017-09-07) refactor show_info(), make it only depend on variables
3
+
4
+ [ v0.26.17] ( https://github.com/nextcloud/nextcloudpi/commit/0197f31 ) (2017-09-07) ncp-web: link to changelog
3
5
4
6
[ v0.26.16] ( https://github.com/nextcloud/nextcloudpi/commit/e3d07fb ) (2017-09-06) added sendmail and mail configuration
5
7
Original file line number Diff line number Diff line change @@ -220,15 +220,17 @@ function launch_script()
220
220
)
221
221
}
222
222
223
+ # show an info box for a script if the INFO variable is set in the script
223
224
function info_script()
224
225
{
225
226
(
226
227
local SCRIPT=$1
227
228
cd /usr/local/etc/nextcloudpi-config.d/ || return 1
228
- unset show_info
229
+ unset show_info INFO INFOTITLE
229
230
source ./" $SCRIPT "
230
- [[ $( type -t show_info ) == function ]] || return 0
231
- [[ $( type -t show_info ) == function ]] && show_info
231
+ local INFOTITLE=" ${INFOTITLE:- Info} "
232
+ [[ " $INFO " == " " ]] && return 0
233
+ whiptail --yesno --backtitle " NextCloudPi configuration" --title " $INFOTITLE " " $INFO " 20 90
232
234
)
233
235
}
234
236
Original file line number Diff line number Diff line change @@ -20,6 +20,13 @@ USER_=www-data
20
20
GROUP_=www-data
21
21
DESCRIPTION=" NFS network file system server (for Linux LAN)"
22
22
23
+ INFOTITLE=" Instructions for external synchronization"
24
+ INFO=" If we intend to modify the data folder through NFS,
25
+ then we have to synchronize NextCloud to make it aware of the changes.
26
+
27
+ This can be done manually or automatically using 'nc-scan' and 'nc-scan-auto'
28
+ from 'nextcloudpi-config'"
29
+
23
30
install ()
24
31
{
25
32
apt-get update
@@ -61,18 +68,6 @@ Alias=portmap
61
68
EOF
62
69
}
63
70
64
- show_info ()
65
- {
66
- whiptail --yesno \
67
- --backtitle " NextCloudPi configuration" \
68
- --title " Instructions for external synchronization" \
69
- " If we intend to modify the data folder through NFS,
70
- then we have to synchronize NextCloud to make it aware of the changes. \n
71
- This can be done manually or automatically using 'nc-scan' and 'nc-scan-auto'
72
- from 'nextcloudpi-config'" \
73
- 20 90
74
- }
75
-
76
71
configure ()
77
72
{
78
73
[[ $ACTIVE_ != " yes" ]] && {
Original file line number Diff line number Diff line change @@ -19,14 +19,7 @@ DNSSERVER_=8.8.8.8
19
19
CACHESIZE_=150
20
20
DESCRIPTION=" DNS server with cache"
21
21
22
- show_info ()
23
- {
24
- whiptail --yesno \
25
- --backtitle " NextCloudPi configuration" \
26
- --title " Info" \
27
- " Remember to point your PC and devices DNS to your Raspberry Pi IP" \
28
- 20 90
29
- }
22
+ INFO=" Remember to point your PC and devices DNS to your Raspberry Pi IP"
30
23
31
24
install ()
32
25
{
Original file line number Diff line number Diff line change @@ -22,26 +22,19 @@ VHOSTCFG=/etc/apache2/sites-available/nextcloud.conf
22
22
VHOSTCFG2=/etc/apache2/sites-available/ncp.conf
23
23
DESCRIPTION=" Automatic signed SSL certificates"
24
24
25
+ INFOTITLE=" Warning"
26
+ INFO=" Internet access is required for this configuration to complete
27
+ Both ports 80 and 443 need to be accessible from the internet
28
+
29
+ Your certificate will be automatically renewed every month"
30
+
25
31
install ()
26
32
{
27
33
cd /etc || return 1
28
34
git clone https://github.com/letsencrypt/letsencrypt
29
35
/etc/letsencrypt/letsencrypt-auto --help # do not actually run certbot, only install packages
30
36
}
31
37
32
- show_info ()
33
- {
34
- whiptail --yesno \
35
- --backtitle " NextCloudPi configuration" \
36
- --title " Warning" \
37
- " Internet access is required for this configuration to complete
38
- Both ports 80 and 443 need to be accessible from the internet
39
-
40
- Your certificate will be automatically renewed every month
41
- " \
42
- 20 90
43
- }
44
-
45
38
# tested with git version v0.11.0-71-g018a304
46
39
configure ()
47
40
{
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ NCDIR=/var/www/nextcloud/
19
19
NCPWB=/var/www/ncp-web/
20
20
DESCRIPTION=" Web Application Firewall for extra security (experimental)"
21
21
22
+ INFOTITLE=" Experimental feature warning"
23
+ INFO=" This feature is highly experimental and has only been tested with
24
+ a basic NextCloud installation. If a new App does not work disable it"
25
+
22
26
install ()
23
27
{
24
28
apt-get update
44
48
EOF
45
49
}
46
50
47
- show_info ()
48
- {
49
- whiptail --yesno \
50
- --backtitle " NextCloudPi configuration" \
51
- --title " Experimental feature warning" \
52
- " This feature is highly experimental and has only been tested with
53
- a basic NextCloud installation. If a new App does not work disable it" \
54
- 20 90
55
- }
56
-
57
51
configure ()
58
52
{
59
53
cat > /etc/modsecurity/modsecurity_crs_99_whitelist.conf << EOF
Original file line number Diff line number Diff line change 17
17
ACTIVE_=no
18
18
DESCRIPTION=" Automount USB drives by plugging them in"
19
19
20
- show_info ()
21
- {
22
- whiptail --yesno \
23
- --backtitle " NextCloudPi configuration" \
24
- --title " Automount notes" \
25
- " Plugged in USB drives will be automounted under /media
20
+ INFOTITLE=" Automount notes"
21
+ INFO=" Plugged in USB drives will be automounted under /media
26
22
on boot or at the moment of insertion.
27
23
28
24
Format your drive as ext4 in order to move NC datafolder or database
29
25
VFAT or NTFS is not recommended for this task, as it does not suport permissions
30
26
31
- Drives with multiple partitions are not supported
32
-
33
- IMPORTANT: halt or umount the drive before extracting" \
34
- 20 90
35
- }
27
+ IMPORTANT: halt or umount the drive before extracting"
36
28
37
29
install ()
38
30
{
Original file line number Diff line number Diff line change 17
17
DBDIR_=/media/USBdrive/ncdatabase
18
18
DESCRIPTION=" Move your database to a new location, like a USB drive"
19
19
20
- show_info ()
21
- {
22
- whiptail --yesno \
23
- --backtitle " NextCloudPi configuration" \
24
- --title " Info" \
25
- " Note that non Unix filesystems such as NTFS are not supported
20
+ INFO=" Note that non Unix filesystems such as NTFS are not supported
26
21
because they do not provide a compatible user/permissions system
27
22
28
23
You need to use a USB drive that is permanently on and is responsive
29
24
or the database will fail.
30
25
31
- ** If it ever fails with a white page, move the database back to the SD **
32
- " \
33
- 20 90
34
- }
26
+ ** If it ever fails with a white page, move the database back to the SD **"
35
27
36
28
configure ()
37
29
{
Original file line number Diff line number Diff line change 17
17
DATADIR_=/media/USBdrive/ncdata
18
18
DESCRIPTION=" Change your data dir to a new location, like a USB drive"
19
19
20
- show_info ()
21
- {
22
- whiptail --yesno \
23
- --backtitle " NextCloudPi configuration" \
24
- --title " Info" \
25
- " Note that non Unix filesystems such as NTFS are not supported
26
- because they do not provide a compatible user/permissions system" \
27
- 20 90
28
- }
20
+ INFO=" Note that non Unix filesystems such as NTFS are not supported
21
+ because they do not provide a compatible user/permissions system"
29
22
30
23
configure ()
31
24
{
Original file line number Diff line number Diff line change 16
16
LABEL_=myCloudDrive
17
17
DESCRIPTION=" Format an external USB drive as a ext4 partition (dangerous)"
18
18
19
- show_info ()
20
- {
21
- whiptail --yesno \
22
- --backtitle " NextCloudPi configuration" \
23
- --title " Instructions for USB drive formatting" \
24
- " Make sure that ONLY the USB drive that you want to format is plugged in.
25
-
26
- Be careful, this will destroy any data in the USB drive
19
+ INFOTITLE=" Instructions for USB drive formatting"
20
+ INFO=" Make sure that ONLY the USB drive that you want to format is plugged in.
21
+ careful, this will destroy any data in the USB drive
27
22
28
- ** YOU WILL LOSE ALL YOUR USB DATA ** " \
29
- 20 90
30
- }
23
+ ** YOU WILL LOSE ALL YOUR USB DATA **"
31
24
32
25
configure ()
33
26
{
You can’t perform that action at this time.
0 commit comments