1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Compare commits

...
Sign in to create a new pull request.

528 commits

Author SHA1 Message Date
A Holt
423e21c52c
Merge pull request #3958 from holta/locale.conf
iiab-diagnostics: Also record /etc/locale.conf (e.g. for Debian 13 Trixie)
2025-03-01 11:58:31 -05:00
A Holt
96ddd6620d
iiab-diagnostics: Fix comments 2025-03-01 11:51:09 -05:00
A Holt
cb42942699
iiab-diagnostics: Clarify that Ubuntu too uses /etc/locale.conf 2025-03-01 11:46:21 -05:00
A Holt
ac12c6db0b
iiab-diagnostics.README.md: Update line number 2025-03-01 11:42:37 -05:00
A Holt
2461a8fde3
iiab-diagnostics: Also record /etc/locale.conf 2025-03-01 11:41:34 -05:00
A Holt
89b1487dc2
Update Nextcloud 31.0.0 disk footprint sizes 2025-02-27 15:40:39 -05:00
A Holt
8dac889ad9
Merge pull request #3957 from holta/ansible-core-2.18.3
Recommend ansible-core 2.18.3
2025-02-24 19:30:59 -06:00
A Holt
6d5fcdbcc2
Recommend ansible-core 2.18.3 2025-02-24 18:25:07 -06:00
A Holt
1308fb8670
Update Nextcloud 30.0.6 disk footprint sizes 2025-02-19 15:21:00 -05:00
A Holt
96324233d8
Clarify PR #3950: 'pip install psycopg' is NEW "Psycopg 3" for PostgreSQL 2025-02-17 04:21:44 -05:00
A Holt
e2c67e43f0
Merge pull request #3950 from holta/pip-installs-to-ansible-venv
pip install {pymysql, psycopg, passlib} to Ansible venv, on demand — to fix 6 IIAB Apps with new `interpreter_python=/usr/local/ansible/bin/python3` in ansible.cfg
2025-02-17 02:59:43 -06:00
A Holt
36e4322775
mysql/tasks/install.yml: Respect original typography 'PyMySQL' 2025-02-17 03:56:40 -05:00
root
957a89d67c pip install {pymysql,psycopg,passlib} to Ansible venv, on demand 2025-02-17 03:24:04 -05:00
A Holt
d1dd071c81
jupyterhub/tasks/install.yml: Mention disk footprint is ~316 MB 2025-02-16 22:02:54 -05:00
A Holt
f16bd2a6b5
jupyterhub/tasks/install.yml touchup: Comment out virtualenv_site_packages: no as tested on PR #3948 2025-02-16 15:02:50 -05:00
A Holt
b8555f86e1
Merge pull request #3948 from jvonau/jubhub
JupHub [JupyterHub fix & cleanup for Debian 13 Trixie, using full path to Python 3.13 in /opt/iiab/iiab/ansible.cfg]
2025-02-16 13:59:59 -06:00
Jerry Vonau
bbdd45365d update ansible.cfg for use with python3.13 2025-02-16 12:36:27 -06:00
Jerry Vonau
2ef96ad0ff jupyterhub drop python3-psutil 2025-02-16 02:49:09 -06:00
Jerry Vonau
66a35ee950 jupyterhub drop --system-site-packages 2025-02-16 02:42:17 -06:00
A Holt
e80b912eea
usb_lib/tasks/main.yml: Tiny comment update RE: iiab.conf.j2 2025-02-15 15:12:20 -05:00
A Holt
5267ef87a6
Merge pull request #3943 from avni/usb_lib_doc
usb_lib/tasks/main.yml: update USB_LIB description to be more clear
2025-02-15 13:59:54 -06:00
root
f52b390821 usb_lib/tasks/main.yml: updating USB_LIB description to be more clear about the two-way information/data exchange between teachers and students 2025-02-15 18:36:28 +00:00
A Holt
14d24fda49
Merge pull request #3942 from avni/jerry
usb_lib: building on to top of @jvonau's work in #3940. Using existence of /media to determine if a USB stick is mounted or not for both count and upload location; changing tabs to spaces for upload2usb.php
2025-02-14 16:18:30 -06:00
avni
fe6516b2e9
Add lockfile removal before exit in usbmount script per Jerry's recommendation.
Add lockfile removal before exit in usbmount script per Jerry's recommendation. Also adjusted spacing! 

Read up on file locking a bit: 
- https://www.baeldung.com/linux/file-locking
- https://linux.die.net/man/1/lockfile-create
2025-02-14 15:56:09 -05:00
root
a96b46c223 upload2usb/upload2usb.php: using existence of /media to determine if a USB stick is mounted or not for both count and upload location; changing tabs to spaces for the whole file 2025-02-13 15:50:02 -05:00
root
728704b250 Merge branch 'umnt3' of https://github.com/jvonau/iiab into jerry 2025-02-13 11:15:44 -05:00
Jerry Vonau
ebceb4a6ac upload2usb.php add 'grep media' to device filter 2025-02-12 13:28:05 -06:00
Jerry Vonau
bd8c131ef6 clearer dependencies 2025-02-12 11:45:04 -06:00
Jerry Vonau
52da42c146 touchups and ordering 2025-02-12 11:19:54 -06:00
Jerry Vonau
9a95a046c4 lockfile-remove for fstab check 2025-02-12 10:36:22 -06:00
Jerry Vonau
759126414e #set -e, lockfile-remove, typo, missing debug line 2025-02-12 10:26:21 -06:00
A Holt
cf606c417b
Merge pull request #3941 from avni/swinglink
upload2usb/header.php: update swing logo to point to /usb/
2025-02-12 09:11:45 -05:00
root
fda19ad7f9 upload2usb/header.php: update swing logo to point to /usb/ instead of /upload2usb/ 2025-02-12 02:18:16 -05:00
Jerry Vonau
9bc2006ba3 exclude usb based device that host usbbooted filesytems 2025-02-11 17:10:02 -06:00
A Holt
543a0e9b0e
Merge pull request #3939 from holta/force-link-to-usb
70-usb-library.j2: Forcibly delete e.g. stale symlink /library/www/html/local_content/USB0 during USB stick insertion
2025-02-11 11:38:10 -05:00
A Holt
1ec743a654
70-usb-library.j2: Fix logger string quotation marks 2025-02-11 10:42:05 -05:00
A Holt
94ca58aa0c
70-usb-library.j2: Cleaner logging & error handling (e.g. exit code 1) 2025-02-11 03:45:52 -05:00
A Holt
2398313918
70-usb-library.j2: Forcibly delete e.g. stale /library/www/html/local_content/USB0 2025-02-11 03:13:51 -05:00
A Holt
c2c36b178e
iiab-check-firmware: Mention 'sudo iiab-network' 2025-02-06 08:07:00 -06:00
A Holt
f084785452
Merge pull request #3932 from avni/rpi-automount-docs
usb_lib/README.rst, usb_lib/tasks/install.yml: docs on how to disable RPI Desktop auto-mount
2025-02-02 16:26:42 -05:00
A Holt
3596963d5c
Further update usb_lib/README.rst 2025-02-02 16:22:38 -05:00
A Holt
38a860d3c5
Update usb_lib/README.rst 2025-02-02 16:12:11 -05:00
root
8eed5e3fac usb_lib/README.rst, usb_lib/tasks/install.yml: Add docs on how to disable Desktop auto-mount functionality on RPi Desktop; other minor doc cleanup 2025-02-02 20:44:02 +00:00
A Holt
11f65e7689
Merge pull request #3931 from holta/tz-hack
Restore both GitHub Actions workflows simulating Raspberry Pi
2025-02-01 09:35:27 -05:00
A Holt
fb787e0649
Update USB_LIB description for iiab.ini 2025-02-01 01:24:47 -05:00
A Holt
f22ba85c49
php-settings.yml: More complete shell hack, equiv to timedatectl 2025-02-01 00:54:47 -05:00
A Holt
c975dd21fc
php-settings.yml: TZ hack that avoids systemd, for GHA 2025-02-01 00:35:54 -05:00
A Holt
810c70e85b
Merge pull request #3930 from holta/detected_network-touchups
Invert rejected country red error; Clarify 3 channel / WiFi country code vars for iiab.ini (in detected_network.yml)
2025-01-31 05:25:55 -05:00
A Holt
b6b2f3a0d7
usbmount copyright URL clarifs for PR #3929 2025-01-31 04:24:07 -05:00
root
3077a39cd6 Invert rejected country red error; Clarify 3 channel/country vars for iiab.ini 2025-01-31 04:08:33 -05:00
A Holt
073939a542
Merge pull request #3929 from holta/usbmount-refine
usb_lib and usbmount refinements built on PR #3916
2025-01-31 03:38:52 -05:00
root
6b4b94dae2 usb_lib / usbmount: Refine, lint, clarify 2025-01-31 01:41:23 -05:00
A Holt
7e56a53549
Merge pull request #3928 from jvonau/race
delay hostapd to allow ap0 to stabilize
2025-01-30 22:08:22 -05:00
Jerry Vonau
80bdfc677e
Update roles/usb_lib/tasks/install.yml
missed during rebase

Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-30 14:13:26 -06:00
Jerry Vonau
97eeae4845 wording 2025-01-30 14:07:51 -06:00
Jerry Vonau
78924e84ba create /media/usb0-7 2025-01-30 13:53:05 -06:00
Jerry Vonau
0dec3fe810 indent 2025-01-30 13:51:28 -06:00
Jerry Vonau
eca12605b9 forgot the dependencies 2025-01-30 13:51:28 -06:00
Jerry Vonau
daa3deb034 Update roles/usb_lib/templates/iiab-clean-usb.sh
to restore previous search-ability

Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-30 13:51:28 -06:00
Jerry Vonau
190d66409f Update roles/usb_lib/templates/iiab-clean-usb.sh
to restore previous search-ability

Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-30 13:51:28 -06:00
root
76d5b5fc17 usb_lib: Minor whitespace typos 2025-01-30 13:51:24 -06:00
Jerry Vonau
e6051088fc RuntimeDirectory=usbmount 2025-01-30 13:50:00 -06:00
Jerry Vonau
34b4a8a7ad ConditionPathExists=/var/run 2025-01-30 13:50:00 -06:00
Jerry Vonau
640ab00d26 update iiab-clean-usb.sh 2025-01-30 13:49:56 -06:00
Jerry Vonau
257dc008ec bump number of lock tries 2025-01-30 13:43:32 -06:00
Jerry Vonau
60ca24d63a replace deb with local files 2025-01-30 13:43:32 -06:00
Jerry Vonau
f58ef26768 just exit to quite down systemd logging of umount failed on stuff we don't care about 2025-01-30 13:43:32 -06:00
Jerry Vonau
a5af8c89d4 move mkdir and copyright 2025-01-30 13:43:32 -06:00
Jerry Vonau
36485a109d turn on debug 2025-01-30 13:43:32 -06:00
Jerry Vonau
229a913ba4 filesystems supported 2025-01-30 13:43:32 -06:00
Jerry Vonau
57fa6bb08f Files from usbmount_0.0.22_all.deb 2025-01-30 13:43:28 -06:00
Jerry Vonau
6c5b4c35ec delay hostapd to allow ap0 to stabilize 2025-01-30 12:24:44 -06:00
A Holt
18c287fe27
Merge pull request #3925 from jvonau/1520
1520 [systemctl daemon_reload if not no_net_restart or...]
2025-01-30 12:27:04 -05:00
A Holt
4e7541fc1e
usb_lib/README.rst: Punctuation cleanup & link to PR #3916 WIP 2025-01-29 14:00:56 -05:00
A Holt
519daacc2a
iiab-network: Run Ansible with --extra-vars "{\"skip_role_on_error\":false}" 2025-01-29 11:05:07 -05:00
A Holt
0c0045f1c8
Merge pull request #3923 from holta/pp
Replacement for PR #3915, cleaning up merge conflict mess [prevent cheating (copying) of usb_lib homework uploads]
2025-01-29 04:50:50 -05:00
A Holt
078bab6d15
Merge pull request #3913 from avni/renamevar
vars/* and usb_lib/*: rename usb_lib_umask0000_for_kolibri
2025-01-29 04:50:37 -05:00
A Holt
4da759a84b
php-settings.yml: Note lack of systemd on chroot GHA runners for RPi 2025-01-29 03:43:03 -05:00
A Holt
668d57cb97
php-settings.yml; Fix typo in TZ explanation (PR #3927, GHA) 2025-01-29 02:26:49 -05:00
A Holt
3bccc1f452
Merge pull request #3927 from holta/php-defaults-way-too-low
PHP's own defaults are Way Too Low, so run www_options/tasks/php-settings.yml every time
2025-01-29 01:46:10 -05:00
A Holt
957cf6976a
PHP defaults TOO LOW, so run www_options/tasks/php-settings.yml every time 2025-01-29 01:20:22 -05:00
A Holt
2d412405fa
Merge pull request #3926 from holta/iiab-diagnostics_locale
iiab-diagnostics: 3 commands to record locale info
2025-01-29 00:54:48 -05:00
A Holt
18efafc23e
iiab-diagnostics.README.md: Update lines numbers 2025-01-29 00:53:18 -05:00
A Holt
16b745d734
iiab-diagnostics: 3 commands to record locale info 2025-01-29 00:42:08 -05:00
Jerry Vonau
00d45099ea 1520 2025-01-28 11:25:04 -06:00
root
f5e2f4ad79 usb_lib/tasks/install.yml: Resolve merge conflict w/ PR #3919 2025-01-27 20:17:44 -05:00
A Holt
178134ba36
Merge pull request #3922 from holta/ansible-core-2.18.2
Recommend ansible-core 2.18.2
2025-01-27 15:56:31 -05:00
A Holt
765d7854c3
Recommend ansible-core 2.18.2 2025-01-27 15:45:34 -05:00
A Holt
e57ea34590
Merge pull request #3919 from avni/u2u25
upload2usb: moving app out of local_content, relaxing mime type requirements, link swing back to homepage
2025-01-26 22:09:59 -05:00
root
c49c7b0d8d usb_lib/files/upload/upload2usb.php: allow zip files given some MacOS files, e.g., Pages files, have a mimetype of application/aip 2025-01-26 21:26:16 -05:00
root
48f4fc56f8 usb_lib/files/upload/header.php: link swing image back to upload2usb main page 2025-01-26 21:20:12 -05:00
root
fb07b9e3e5 nginx/templates/iiab.conf.j2, usb_lib/files/upload/header.php, usb_lib/tasks/install.yml: move app out of local_content and into /library/www/html/ 2025-01-26 21:18:30 -05:00
A Holt
8cbcff710e
Merge pull request #3918 from avni/uf-fix
upload/upload-file.php: fix var name bug and add better error handling
2025-01-26 10:56:08 -05:00
avni
1795276b20 upload/upload-file.php: fix var name bug and add better error handling 2025-01-26 16:36:43 +01:00
A Holt
7812edfed0
Fix 2 typos (explanation of when: not usb_lib_writable_sticks) 2025-01-26 09:32:49 -05:00
A Holt
cea4cac7f2
Clarify reset of FS_MOUNTOPTIONS in /etc/usbmount/usbmount.conf, if usb_lib_writable_sticks False 2025-01-26 09:28:48 -05:00
A Holt
d4e66748f3
usb_lib/install.yml: Clarify usb_lib_writable_sticks and umask=0000 2025-01-26 00:42:32 -05:00
avni
5663a84d27
70-usb-library.j2: update comment explaining PUBLIC folder better (from @holta)
Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-25 23:57:27 -05:00
avni
920235d54c 70-usb-library.j2: use findmnt instead of UM_DEVICE from usbmount to find device given the missing leading /; adding comment about public folder 2025-01-26 04:41:10 +01:00
avni
27e286b8ae
70-usb-library.j2: comm
Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-25 20:55:13 -05:00
A Holt
425cbf494c
iiab-clean-usb.sh: $() instead of `` for command substitution 2025-01-25 20:54:32 -05:00
avni
cd160da679
70-usb-library.j2: syntax change to CONTENT_LINK_USB var
Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-25 20:52:04 -05:00
avni
2401ff3d60
70-usb-library.j2: Add additional logging of lib/root/boot mount points
Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-25 20:49:12 -05:00
A Holt
d0a00da601
usb_lib/README.rst: Clarify usbmount supported filesystems line 2025-01-25 20:08:37 -05:00
avni
427dc57ed0
70-usb-library.j2: revert duplicate comment
Revert duplicate comment

Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-25 17:45:54 -05:00
avni
2462bba6f5
70-usb-library.j2: Fix symlink from/to in comment
Thank you!

Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-25 17:45:11 -05:00
avni
64756b6772
Update roles/usb_lib/templates/mount.d/70-usb-library.j2
Add thanks and reference to PR #3254

Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-25 17:35:43 -05:00
avni
18c5fe711d
Update roles/usb_lib/templates/mount.d/70-usb-library.j2
Add thanks and reference to PR #3254

Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-25 17:30:14 -05:00
avni
f9538a4834
mount.d/70-usb-library.j2: move lib/root/boot check above check for PUBLIC dir
Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-25 17:04:46 -05:00
avni
341df04d90 Merge branch 'pp' of https://github.com/avni/iiab into pp 2025-01-25 22:44:19 +01:00
avni
13f5227824 vars/local_vars*, vars/default_vars.yml, roles/usb_lib/tasks/main.yml: reverting comment of iiab_usb_lib_show_all 2025-01-25 22:39:00 +01:00
avni
6562a4a12d
70-usb-library.j2: remove blank at EOF
Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-25 16:02:01 -05:00
root
d15493b399 Begin to remove iiab_usb_lib_show_all and IIAB_USB_LIB_SHOW_ALL 2025-01-25 15:47:56 -05:00
root
fe633b2cd7 Upload2USB initial doc cleanup 2025-01-25 15:36:05 -05:00
avni
7c2f0c9c6e usb_lib/*, vars/*: prevent Cheating (Copying) of homeworks, when teacher creates 'PUBLIC' folder on their USB stick 2025-01-25 21:30:36 +01:00
avni
44e2772ccc
Update README to clarify Kolibri exports 2025-01-25 09:44:02 -05:00
A Holt
b0ef084ac8
Merge pull request #3914 from avni/updateerror2
error.php: updating FAQ reference to refer to new upload2usb FAQ
2025-01-25 08:26:19 -05:00
avni
286890b0d0 error.php: updating FAQ reference to refer to new upload2usb-specific FAQ. 2025-01-25 08:14:44 +01:00
avni
3b9edfdfc0 multiple files in vars/ and usb_lib/: rename usb_lib_umask0000_for_kolibri to usb_lib_writable_sticks so it is more generally applicable 2025-01-25 07:13:09 +01:00
A Holt
a20aebf9c2
Merge pull request #3911 from jvonau/usbmount
use systemd-udev-trigger.service BUGFIX
2025-01-24 12:13:29 -05:00
A Holt
ae1ecdfd89
Merge pull request #3908 from jvonau/dmesg
detect Firmware rejected country setting
2025-01-24 10:07:18 -05:00
A Holt
eecf6f8306
Wifi Country Code might in the middle of dmesg line (not on the right) 2025-01-24 10:06:30 -05:00
Jerry Vonau
e319b394e8
Update roles/network/tasks/detected_network.yml
future proof

Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-24 08:14:42 -06:00
Jerry Vonau
dcc9862527 use systemd-udev-trigger.service 2025-01-23 15:36:19 -06:00
Jerry Vonau
9991273391 grep & stdout 2025-01-23 12:36:55 -06:00
A Holt
dd4a9088b4
Merge pull request #3875 from avni/master
Initial commit of upload2usb App for homework assignments for students and teachers worldwide! [and, upload photos/projects to community's USB stick]
2025-01-23 09:44:06 -05:00
Jerry Vonau
eb21c8654a UNSET 2025-01-23 06:45:38 -06:00
Jerry Vonau
0cc63d8895 detect cmdline country code passed 2025-01-23 02:38:56 -06:00
avni
6dfda009e4 upload2usb.php: allow all word files, be more specific about xml mimetypes; log error message if user uploads invalid mimetype 2025-01-23 06:51:43 +01:00
avni
68dafdbc39 button.html: change button href to point to /usb/upload instead of /local_content/upload 2025-01-23 06:27:32 +01:00
avni
91533f5fb3 iiab.conf.j2: modify config to route /usb/upload/*.php to the upload2usb app! 2025-01-23 06:19:25 +01:00
avni
ad175fb3ca index.php, upload-file.php: change 'submit' to 'upload' in user-facing text 2025-01-23 06:19:13 +01:00
A Holt
89a06d6e5e
Update iiab-diagnostics.README.md for PR #3909 2025-01-22 18:26:43 -05:00
A Holt
b6153b9a05
Merge pull request #3909 from holta/iiab-diagnostics_dmesg_fixes
iiab-diagnostics: Refine 3+ 'sudo dmesg | grep ...' cmds
2025-01-22 18:20:26 -05:00
A Holt
765e1cd4b1
iiab-diagnostics: Use sudo with journalctl (in all 6 cases_ 2025-01-22 17:42:56 -05:00
A Holt
01baaa661a
iiab-diagnostics: Refine 3+ 'sudo dmesg | grep ...' cmds 2025-01-22 16:53:44 -05:00
avni
335d8ad4c1 nginx/templates/iiab.conf.j2, usb_lib/files/upload/button.html: Adding button to upload2usb app on every usb/ directory listing page. 2025-01-22 10:22:38 +01:00
avni
f79a43e305 install.yml: merging comments related to usb_lib_umask0000_for_kolibri 2025-01-22 10:16:21 +01:00
avni
024defc89c install.yml: merging umask comments 2025-01-22 05:40:55 +01:00
Avni Khatri/Fein
0caa16491d
install.yml: adding e.g. to make clear that variable doesn't have to be in local_vars.yml" roles/usb_lib/tasks/install.yml
Co-authored-by: A Holt <holta@users.noreply.github.com>
2025-01-21 23:27:45 -05:00
avni
f15a50610e install.yml: Adding instructions on how to unmount and mount drive manually if writing to the USB stick still doesn't work. 2025-01-22 05:18:41 +01:00
Jerry Vonau
0994a5786d detect Firmware rejected country setting 2025-01-20 08:53:25 -06:00
A Holt
8e7888a51a
Merge pull request #3905 from jvonau/hotspot-on-off
replace is_raspbian with dhcpcd_result == enabled
2025-01-19 15:51:02 -05:00
avni
e4bdc4ddab install.yml: add comment that usb_lib_umask0000_for_kolibri must be set to true in order to write to USB sticks. 2025-01-19 09:04:01 +01:00
avni
9426e6ac98 upload-file.php: throw error when user uploads a file that has the same content and name as an already uploaded file on the same day. 2025-01-19 08:21:27 +01:00
Jerry Vonau
f60a61ea4b replace is_raspbian with dhcpcd_result == enabled 2025-01-18 14:04:33 -06:00
A Holt
0cdf077113
Merge pull request #3902 from holta/revert-arm-ci-to-ubuntu-2204
GitHub Actions CI: Revert ARM tests to run on Ubuntu 22.04 (for now)
2025-01-18 02:50:44 -05:00
root
6f63de1622 Clarify & tighten up all 3 GHA workflow names (titles) 2025-01-18 02:42:28 -05:00
root
66fd7fad39 Cleaner 30min-iiab-test-install-raspios-on-zero2w.yml 2025-01-18 01:46:50 -05:00
root
d6b7114afc CI: Revert ARM tests to run on Ubuntu 22.04 for now 2025-01-18 01:35:36 -05:00
A Holt
cb0788b7ba
Merge pull request #3901 from holta/iiab-diagnostics_cleaner_cmd-not-found
iiab-diagnostics: Cleaner output if COMMAND NOT FOUND
2025-01-18 00:24:36 -05:00
root
803197e817 iiab-diagnostics.README.md: Update key line numbers 2025-01-18 00:23:47 -05:00
root
a81856db5d iiab-diagnostics: Cleaner output if COMMAND NOT FOUND 2025-01-18 00:09:09 -05:00
avni
271da50114 upload-file.php: Allow upload of redundant files 2025-01-17 23:03:01 +01:00
A Holt
e2113c5da0
Merge pull request #3899 from holta/iiab-diagnostics-wifi-etc
iiab-diagnostics: A bit more logging around wpa_supplicant, NetworkManager, dmesg | grep Firmware, rpi-eeprom-update to show bootloader version
2025-01-17 13:18:12 -05:00
A Holt
d09842245b
iiab-diagnostics: Clarify RPi WiFi firmware / HW models 2025-01-17 13:09:48 -05:00
A Holt
720e328ab6
iiab-diagnostics: Cap NetworkManager logging at 100 lines for now 2025-01-17 10:55:43 -05:00
A Holt
59f1d1b090
iiab-diagnostics: rpi-eeprom-update to show bootloader version 2025-01-17 10:23:36 -05:00
A Holt
ebbe9c066e
iiab-diagnostics: wpa_supplicant, NetworkManager, dmesg | grep Firmware 2025-01-17 10:16:37 -05:00
avni
f8b743dafc error.php, index.php, upload-file.php, upload2usb.php: Updating error message to refer to FAQs, titles to be more succinct, adding exception when directory can't be created. 2025-01-17 09:34:15 +01:00
A Holt
c00ceb7f2a
Merge pull request #3892 from jvonau/wpa
don't restart wpa_supplicant when network_manager_active is set
2025-01-16 14:47:25 -05:00
A Holt
c2046a1a91
Merge pull request #3891 from jvonau/firmware
Firmware [WiFi]
2025-01-16 10:01:38 -05:00
A Holt
a5e90f6511
network/tasks/main.yml: Blank line 2025-01-16 09:54:44 -05:00
A Holt
ca22622c7d
detected_network.yml: Record WiFi firmware vars (43430 & 43455) 2025-01-16 09:51:32 -05:00
Jerry Vonau
d52fe013cd don't restart wpa_supplicant when network_manager_active is set 2025-01-16 07:07:51 -06:00
Jerry Vonau
3bb41e2e07 move firmware replacement 2025-01-15 04:43:20 -06:00
Jerry Vonau
a16be49be5 add recording of firmware selection and force wifi_up_down false when required 2025-01-15 04:43:20 -06:00
Tim Moody
0c4df6c42c
Merge pull request #3889 from tim-moody/8.2.3-www-data
set www_data poweroff false with rename
2025-01-14 11:44:54 -05:00
A Holt
d3730b9494
Merge pull request #3886 from jvonau/HT-new2
dont start hostapd when no_net_restart is True
2025-01-13 22:20:39 -05:00
A Holt
3fa91b821a
Merge pull request #3885 from jvonau/HT-new
Ht new
2025-01-13 22:20:20 -05:00
A Holt
2981a7deaa
hostapd.yml: "Disable the Access Point 'hostapd' service if hostapd_enabled False" 2025-01-13 22:19:43 -05:00
tim-moody
e75a8e5449 set www_data poweroff false with rename 2025-01-13 19:43:02 -05:00
A Holt
34326f7318
Merge pull request #3887 from jvonau/tailscale
deal with tailscale0
2025-01-13 18:33:57 -05:00
Jerry Vonau
fb008640ef deal with tailscale0 2025-01-13 17:17:58 -06:00
Jerry Vonau
a9c916e219 dont start hostapd when no_net_restart is True 2025-01-13 17:10:56 -06:00
Jerry Vonau
fa8cc5637e move channel detection also 2025-01-13 17:06:19 -06:00
Jerry Vonau
9391d37f40 move country code detection 2025-01-13 17:06:19 -06:00
Jerry Vonau
917c6840d6 better visual feedback when running 2025-01-13 17:06:19 -06:00
avni
312ddce9ec Adding PR number to beginning of upload2usb block 2025-01-12 12:07:37 +01:00
avni
30f940a5f4 error.php, header.php, footer.php - Add custom exception handling, header, footer; index.php, upload-file.php, upload-2-usb.php - Require exactly 1 USB stick to be inserted, allow same file name but different content (using incremental numbering), reject duplicate content, restrict file types 2025-01-12 12:04:47 +01:00
avni
956257f6cb usb_lib/upload/*.php, usb_lib/tasks/install.yml: Moving app from upload2usb/ to upload/; Fixing UK image on upload-file page; Minor formatting changes 2025-01-08 11:45:00 +01:00
A Holt
1da4d45509
Update LICENSING.md 2025-01-06 00:29:57 -05:00
A Holt
6fe7b11511
Merge pull request #3879 from avni/usbcup
usb_lib/templates/content_dir.conf.unused: mark unused [Apache] file as such
2025-01-06 00:23:54 -05:00
root
8fb5656189 usb_lib/templates/content_dir.conf.unused: rename unused file 2025-01-05 23:43:52 -05:00
avni
99ff433a90 usb_lib/files/upload2usb/*: renaming app to Upload To USB instead of HW Submission, other minor cleanup/styling 2025-01-06 04:48:19 +01:00
avni
2706381a38 usb_lib/tasks/install.yml: Fixing yaml so upload2usb directory is created before files are copied 2025-01-06 04:46:28 +01:00
avni
8d167ab981 roles/usb_lib/tasks/install.yml: Add yaml to copy upload2usb app files to local_content folder 2025-01-06 01:12:24 +01:00
root
8d0f45bd4d Initial commit(x3) of Upload2USB stick app: 3 *.php files + UK logo 2025-01-05 16:35:38 -05:00
A Holt
886e98c0cb
Merge pull request #3874 from holta/launch-8.3-cycle
default_vars.yml: Launch 8.3 Release Cycle
2025-01-01 01:22:01 -05:00
A Holt
59956f2a91
default_vars.yml: Launch 8.3 Release Cycle 2024-12-31 22:20:48 -05:00
A Holt
b4319bf787
Merge pull request #3873 from holta/mediawiki-1.43.0
New MediaWiki 1.43.0 LTS
2024-12-31 22:00:14 -05:00
A Holt
3ebf210c99
New MediaWiki 1.43.0 LTS 2024-12-31 21:56:16 -05:00
A Holt
150c14ab54
Merge pull request #3872 from avni/patch-2
Update iiab-vpn to fix ANSI color codes on macOS and change text color on blue bg
2024-12-28 16:34:54 -05:00
Avni Khatri/Fein
1950a5ba6d
Update iiab-vpn to fix ANSI color codes on OSX and change text color on blue bg.
- Update iiab-vpn to fix ANSI color codes on OSX by using \033 instead of \e
- Change text color to light gray when using blue bg
2024-12-28 15:59:56 -05:00
A Holt
afa8ae0eeb
roles/usb_lib/README.rst: Fix 2 URLs 2024-12-22 13:44:30 -05:00
A Holt
6a6030b40b
Merge pull request #3870 from holta/mediawiki-1.42.4
New MediaWiki 1.42.4
2024-12-21 10:16:00 -05:00
A Holt
079c7f5fa2
New MediaWiki 1.42.4 2024-12-21 10:11:53 -05:00
Tim Moody
04e02587c5
Merge pull request #3869 from tim-moody/8.2.1-www-data
rename apache_allow_sudo and make True default
2024-12-21 08:16:38 -05:00
A Holt
6b96085050
iiab-vpn: Update 3 Headscale doc URLs (Android, Apple, Windows) 2024-12-19 23:26:00 -05:00
tim-moody
3c32db26bd rename apache_allow_sudo and make True default 2024-12-19 14:28:03 -05:00
A Holt
d886f39bbf
Merge pull request #3867 from holta/wifi-unblock
Refine PR #3866 to unblock WiFi hotspot on newer RasPiOS with NM (NetworkManager)
2024-12-19 12:52:12 -05:00
A Holt
1c9a784d2a
WiFi unblock via "rpi_debian.yml wasn't enough, especially with NM" 2024-12-18 22:59:25 -05:00
root
4a3e9517dc Clarify 'raspi-config nonint do_wifi_country XX' 2024-12-18 19:55:14 -05:00
Jerry Vonau
6a6d153034 deal with unblocking wifi while NM is active on newer RaspiOS 2024-12-18 08:47:43 -06:00
A Holt
299228e31e
Merge pull request #3865 from holta/rfkill-unblock-wifi
rpi_debian.yml: rfkill unblock wifi
2024-12-17 08:26:00 -05:00
A Holt
f722cd783e
rpi_debian.yml: rfkill unblock wifi 2024-12-17 00:04:20 -05:00
A Holt
b8a868e231
Fix Ansible comment RE: python3-netifaces (PR #3852) 2024-12-16 22:25:36 -05:00
A Holt
5665b68b13
Merge pull request #3864 from holta/imagemagick-7
Bypass /etc/ImageMagick-6/policy.xml PDF surgery w/ ImageMagick 7+
2024-12-16 21:44:42 -05:00
A Holt
9db5dbe3a4
Merge pull request #3862 from deldesir/deldesir-patch-5
Check if older version of 'library' (xklb) is installed
2024-12-16 21:40:34 -05:00
A Holt
f244669068
Merge pull request #3852 from jvonau/calweb-no-netif
drop netifaces workaround - replaced with netifaces-plus
2024-12-16 21:40:25 -05:00
A Holt
8b5ea641d4
Bypass /etc/ImageMagick-6/policy.xml PDF surgery w/ ImageMagick 7+ 2024-12-16 21:30:00 -05:00
A Holt
9e235424dc
Merge pull request #3863 from holta/asterisk-22
Asterisk 22 (instead of 21, tested on Debian 13)
2024-12-16 18:43:35 -05:00
root
325d27a32b Asterisk 22 (instead of 21, tested on Debian 13) 2024-12-16 18:37:47 -05:00
Blondel MONDESIR
943dcccf7d
Make yt-dlp symlink failsafe 2024-12-16 07:31:07 -05:00
Blondel MONDESIR
7f37ccd8db
Remove grep step 2024-12-16 07:25:06 -05:00
Blondel MONDESIR
58c5e8e71f
Enhance library existence check 2024-12-15 22:00:40 -05:00
Blondel MONDESIR
59470cd134
Update install.yml to check if older xklb is present 2024-12-15 21:42:07 -05:00
Blondel MONDESIR
577a8f171f
Ensure script continues even if 'library' is not installed 2024-12-15 21:20:52 -05:00
Blondel MONDESIR
ad57789c65
Check if older version of 'library' (xklb) is installed 2024-12-15 21:00:30 -05:00
A Holt
0bf49da18b
Merge pull request #3860 from holta/xklb-rename-to-library
Rename `xklb` to `library` for pipx
2024-12-13 18:58:52 -05:00
A Holt
9dfaccef74
scripts/iiab-update: Rename xklb to library for pipx 2024-12-13 18:50:35 -05:00
A Holt
e2d646ee18
calibre-web/tasks/install.yml: Rename xklb to library for pipx 2024-12-13 18:48:37 -05:00
A Holt
8a9945f014
Merge pull request #3859 from holta/labwc
Permit autostart of Chrome browser & pop-up warnings {iiab-netwarn, iiab-pwdwarn-labwc} w/ compositor labwc (no longer Wayfire) on new Raspberry Pi OS
2024-12-12 17:57:03 -05:00
root
36a5cd458f Parallelize 3 autostart cmds in ~/.config/labwc/autostart 2024-12-12 23:51:09 +01:00
root
ae40f78d23 Put iiab-netwarn & iiab-pwdwarn-labwc in ~/.config/labwc/autostart 2024-12-12 22:54:44 +01:00
root
7544b79285 Enact Chrome browser autostart w/ compositor labwc (no longer wayfire) for RasPiOS 2024-12-12 22:19:27 +01:00
A Holt
adfc1cc696
RasPiOS compositor change (wayfire to labwc) so Chrome browser autostart needs work 2024-12-09 13:44:56 -05:00
A Holt
01304ab133
Nextcloud 30.0.4 disk footprint estimates 2024-12-09 13:14:53 -05:00
Jerry Vonau
0e68361814 drop netifaces workaround - replaced with netifaces-plus 2024-12-08 12:08:42 -06:00
A Holt
5e818c9fd1
Merge pull request #3848 from holta/ansible-core-2.18.1
Recommend ansible-core 2.18.1
2024-12-02 13:07:42 -05:00
A Holt
c16d76ac29
MIN_ANSIBLE_VER=2.16.14 2024-12-02 12:59:26 -05:00
A Holt
676f3eebef
Recommend ansible-core 2.18.1 2024-12-02 12:58:02 -05:00
A Holt
537c6a84c2
Update README.md 2024-11-19 17:04:54 -05:00
A Holt
defa139a34
Update CONTRIBUTING.md 2024-11-19 17:00:50 -05:00
A Holt
123a0cc5f1
Update README.md link to RENAMED Contributors Guide 2024-11-19 11:39:41 -05:00
A Holt
750c15ade1
Update CONTRIBUTING.md link 2024-11-19 11:38:15 -05:00
A Holt
72ff97ef9f
Merge pull request #3845 from holta/transmission-bug-ongoing-on-2504
Defer initial install of Transmission... on Ubuntu 25.04 too!
2024-11-16 18:22:22 -05:00
A Holt
13557b1172
Defer install of Transmission on Ubuntu 25.04 too 2024-11-16 18:17:35 -05:00
A Holt
0554e48f81
Merge pull request #3844 from holta/lokole-unmaintained-warnings
Mention that Lokole in UNMAINTAINED (in 5 local_vars.yml files)
2024-11-09 10:46:19 -05:00
A Holt
a646a45aea
local_vars_large.yml: Mention that Lokole is UNMAINTAINED 2024-11-09 10:43:23 -05:00
A Holt
aae6729632
local_vars_medium.yml: Mention that Lokole is UNMAINTAINED 2024-11-09 10:43:08 -05:00
A Holt
7b63f0b30e
local_vars_small.yml: Mention that Lokole is UNMAINTAINED 2024-11-09 10:42:49 -05:00
A Holt
1234d11630
local_vars_unittest.yml: Mention that Lokole in UNMAINTAINED 2024-11-09 10:42:28 -05:00
A Holt
6f7855f3d9
default_vars.yml: Mention that Lokole in UNMAINTAINED 2024-11-09 10:42:09 -05:00
A Holt
baecd48c7c
Merge pull request #3843 from holta/gha-tmp-hack-forcing-u2404
10min-iiab-test-install.yml: Tmp GHA hack using ubuntu-24.04 [and recommend ansible-core 2.18.0]
2024-11-08 19:39:33 -05:00
A Holt
abe1895024
Recommend ansible-core 2.18.0 2024-11-08 19:31:06 -05:00
A Holt
8ff3c7c221
10min-iiab-test-install.yml: Tmp GHA hack using ubuntu-24.04 2024-11-08 19:27:32 -05:00
A Holt
9d8637abda
Merge pull request #3842 from holta/MIN_ANSIBLE_VER
ansible-core 2.15 EOL November 2024, MIN_ANSIBLE_VER=2.16.13
2024-11-08 15:44:26 -05:00
A Holt
129f284286
2.15 EOL November 2024, MIN_ANSIBLE_VER=2.16.13 2024-11-08 15:42:08 -05:00
A Holt
8cb5a79933
Merge pull request #3828 from holta/u2504
Ubuntu 25.04 pre-release testing + actively discourage 3 old OS's
2024-11-08 15:18:47 -05:00
A Holt
d13110d2f3
Merge pull request #3838 from holta/tailscale-tab-completion-fix
Fix tailscale tab completion, when /etc/bash_completion.d does not yet exist
2024-10-28 12:47:28 -06:00
A Holt
0616e1c097
Fix tailscale tab completion (mkdir -p /etc/bash_completion.d) 2024-10-28 14:33:41 -04:00
A Holt
763fe075ac
Merge pull request #3837 from holta/revert_python3-cryptography
Revert PR #3815: python3-cryptography no longer needed
2024-10-27 10:29:48 -06:00
A Holt
ef868120a1
Revert PR #3815: python3-cryptography no longer needed 2024-10-27 10:19:18 -06:00
Tim Moody
1d9c0199cb
Merge pull request #3835 from tim-moody/zimit
only support versioned zims if have YYYY-MM ending
2024-10-23 10:27:15 -04:00
tim-moody
965d494412 only support versioned zims if have YYYY-MM ending 2024-10-23 09:25:13 -04:00
A Holt
759ebb48dd
iiab-vpn: Revert 018b0d2, as online/offline colors failed on some terminals 2024-10-18 08:24:47 -04:00
A Holt
018b0d21b8
PR #3834: Tighten iiab-vpn output of online/offline 2024-10-18 00:07:22 -04:00
A Holt
735683f509
Merge pull request #3834 from holta/iiab-vpn_status5
Fix iiab-vpn output, when tag:username is missing from any Tailscale peer/node (IP address) — avoiding jq error "Cannot iterate over null (null)"
2024-10-17 15:34:34 -04:00
A Holt
f00f225e28
iiab-vpn: Fix PR #3813 output, when Tailscale tag is missing 2024-10-17 15:22:57 -04:00
A Holt
ec348fcc02
moodle/defaults/install.yml: 4.6dev -> 5.0dev for #3826 2024-10-15 21:36:33 -04:00
A Holt
75f9f61358
moodle/defaults/main.yml: 4.6dev -> 5.0dev for #3826 2024-10-15 21:35:47 -04:00
A Holt
194ac9b469
README.md: Mention 50+ FAQ.IIAB.IO questions + answers 2024-10-12 21:48:14 -04:00
A Holt
5a9b929901
Merge pull request #3829 from holta/iiab-summary_vpn_cleanup
iiab-summary: Clean output, when tailscale has no IP
2024-10-11 14:57:28 -04:00
A Holt
aedc893bd1
iiab-summary: Clean output, when tailscale has no IP 2024-10-11 14:49:58 -04:00
root
d07ae98898 Ubuntu 25.04 pre-release testing; Discourage 3 old OS's 2024-10-11 01:46:02 -04:00
A Holt
3651ac666e
Merge pull request #3826 from holta/moodle-4.5
New Moodle 4.5 LTS
2024-10-09 00:52:50 -04:00
A Holt
4be68d3ac1
moodle/tasks/install.yml: Revise disk footprint estimates 2024-10-09 00:51:57 -04:00
A Holt
49d7160116
moodle/defaults/main.yml: Install 4.5 LTS by default, or... 2024-10-09 00:27:55 -04:00
A Holt
ab8c071374
moodle/tasks/install.yml: Install 4.6dev if PHP >= 8.4 2024-10-09 00:25:05 -04:00
A Holt
b91e953444
Merge pull request #3825 from holta/ansible-core-2.17.5
Recommend ansible-core 2.17.5
2024-10-07 16:03:58 -04:00
A Holt
8e09f02bed
Recommend ansible-core 2.17.5 2024-10-07 15:47:00 -04:00
A Holt
ccf87c8b90
iiab-diagnostics: Note https://temp.sh for pastebin-like large file xfer 2024-10-02 21:07:50 -04:00
A Holt
07cf519467
Merge pull request #3818 from holta/wireless-tools_dying
RIP apt package `wireless-tools` (Ansible output will auto-highlight distros that increasingly deprecate it, to help us monitor Debian 13/14/etc)
2024-10-02 17:09:08 -04:00
root
297afc3b72 RIP apt package 'wireless-tools' (or Debian 13+ might keep it?) 2024-10-02 16:49:25 -04:00
A Holt
ace3b3df32
Merge pull request #3817 from holta/unittest_faster_without_network
local_vars_unittest.yml: SKIP roles/network, for FASTER UNIT TESTING
2024-10-02 13:37:59 -04:00
A Holt
e7eb246a1d
local_vars_unittest.yml: SKIP roles/network, for FASTER UNIT TESTING 2024-10-02 13:24:45 -04:00
A Holt
b7b1b59763
Merge pull request #3815 from deldesir/deldesir-patch-3
Experimenting with various apt package installs [e.g. python3-cryptography, so Calibre-Web unit test works on Raspberry Pi OS]
2024-10-02 09:24:16 -04:00
A Holt
8493040b96
Merge pull request #3816 from holta/iiab-update_tailscale_too
scripts/iiab-update: Also update /usr/bin/iiab-vpn
2024-10-01 20:20:03 -04:00
root
c7b566418b scripts/iiab-update: Also update /usr/bin/iiab-vpn 2024-10-01 19:58:33 -04:00
A Holt
23e92b5853
calibre-web/tasks/install.yml: Mention iiab/calibre-web#260 2024-10-01 18:52:20 -04:00
A Holt
1f75537309
calibre-web/tasks/install.yml: Explain python3-cryptography 2024-10-01 17:59:46 -04:00
Blondel MONDESIR
526dc22fb8
Make calibre-web role install cryptography 2024-10-01 16:39:22 -04:00
Blondel MONDESIR
9302dfbd65
Merge pull request #3 from iiab/master
Sync with upstream
2024-10-01 16:13:34 -04:00
A Holt
27e287e508
Merge pull request #3814 from holta/mediawiki-1.42.3
MediaWiki 1.42.3 (security & maintenance release)
2024-09-30 21:55:06 -04:00
A Holt
d941a8ffbe
MediaWiki 1.42.3 (security & maintenance release) 2024-09-30 21:52:11 -04:00
A Holt
772c5ec810
Merge pull request #3813 from holta/iiab-vpn_status4
Cleaner columns in iiab-vpn output, when tag &/or relay missing
2024-09-30 16:44:18 -04:00
A Holt
08f2f2191c
Cleaner columns in iiab-vpn output, when tag &/or relay missing 2024-09-30 16:39:47 -04:00
A Holt
90d6af32a7
Mention Calibre-Web's official upstream install instructions 2024-09-30 09:45:55 -04:00
A Holt
e30cefc393
Merge pull request #3811 from holta/internet_access_test-BETTER
Internet access test... more relevant... for live scraping of IIAB docs during IIAB installs (i.e. /usr/bin/iiab-refresh-wiki-docs)
2024-09-29 11:39:14 -04:00
root
278ec39f2c Internet access test..more relevant..for IIAB docs 2024-09-29 11:33:05 -04:00
A Holt
4c8c2a1c2f
Merge pull request #3810 from holta/unittest_with_nodocs
`nodocs: True` in local_vars_unittest.yml
2024-09-28 11:14:05 -04:00
A Holt
c81e3629ff
nodocs: True in local_vars_unittest.yml 2024-09-28 11:11:22 -04:00
A Holt
4dd927cfd0
Merge pull request #3804 from holta/iiab-vpn_status3
Tighten & brighten iiab-vpn status table output
2024-09-23 04:01:14 -04:00
root
13fcd0f9c5 Tighten & brighten iiab-vpn status table 2024-09-23 03:52:37 -04:00
A Holt
67458abfc0
Merge pull request #3803 from holta/iiab-vpn_status2
Refine iiab-vpn status table of Tailscale IPs/usernames/etc
2024-09-22 23:34:03 -04:00
root
95986ae681 Refine iiab-vpn status table of Tailscale IPs/usernames/etc 2024-09-22 23:20:07 -04:00
A Holt
4386d2f3d3
Merge pull request #3802 from holta/tailscale-doc-fixes
Doc quick fixes for Tailscale PRs #3798 & #3800
2024-09-22 19:27:30 -04:00
root
d72e60c87d Doc fixes for Tailscale PRs #3798 & #3800 2024-09-22 19:19:35 -04:00
A Holt
086087b65b
iiab-vpn PR #3800 doc: Table of IPs/usernames/etc 2024-09-18 19:51:15 -04:00
A Holt
e98cd76ec0
iiab-vpn: Trailing newline forgotten in PR #3800 2024-09-18 15:17:59 -04:00
A Holt
f21c4c0572
Merge pull request #3800 from holta/iiab-vpn_status
Improve iiab-vpn command, to show status of each IP in a table (+ better tips!)
2024-09-18 15:14:04 -04:00
A Holt
71f6d0371b
iiab-vpn shows status of each IP (+ better tips!) 2024-09-18 15:08:55 -04:00
A Holt
5414eb3c38
iiab-vpn tip: Show IPs tagged with usernames 2024-09-18 11:34:32 -04:00
A Holt
d3d0b9767c
iiab-vpn: Tailscale tips for Android, Mac/iOS, Windows 2024-09-16 09:39:44 -04:00
A Holt
35bdd1181b
iiab-vpn doc for #3798: tailscale ping --verbose [IP or HOSTNAME] 2024-09-16 08:22:46 -04:00
A Holt
c88f1418ad
nextcloud/README.md: Mention NEW Nextcloud 30 2024-09-15 05:48:08 -04:00
A Holt
f07832105d
Add openvpn to unmaintained-roles.txt, per PR #3798 2024-09-15 05:17:38 -04:00
A Holt
762fed228a
Merge pull request #3798 from holta/vpn
Introduce new VPN approach (roles/tailscale) with commands iiab-vpn and iiab-vpn-off in /usr/bin
2024-09-15 05:00:13 -04:00
root
c7000f330b Introduce roles/tailscale w/ /usr/bin/iiab-vpn etc 2024-09-15 03:51:07 -04:00
A Holt
814a97be9c
Merge pull request #3797 from holta/ansible-core-2.17.4
Recommend ansible-core 2.17.4
2024-09-09 15:49:41 -04:00
A Holt
bea4aea7a0
Recommend ansible-core 2.17.4 2024-09-09 15:45:33 -04:00
A Holt
d1bd41bf48
Merge pull request #3791 from holta/moodle-main-not-master
Moodle dev branch renamed from 'master' to 'main'
2024-08-22 21:42:14 -04:00
root
3bb74ec09a Moodle dev branch renamed from 'master' to 'main' 2024-08-22 21:32:24 -04:00
A Holt
86fa7bd49c test.yml: Tips to try ad hoc Ansible commands 2024-08-15 10:02:49 -04:00
A Holt
b88a3854df
Merge pull request #3787 from holta/ansible-core-2.17.3
Recommend ansible-core 2.17.3
2024-08-13 21:05:25 -04:00
A Holt
e1eb26ba68
Recommend ansible-core 2.17.3 2024-08-13 00:15:30 -04:00
A Holt
d79a0bde06
Merge pull request #3786 from holta/iiab-diagnostics_pastebin_centos
iiab-diagnostics: Try paste.centos.org instead of dpaste.com
2024-08-10 21:48:46 -04:00
A Holt
2c5398dfb2
iiab-diagnostics: Clarify termbin.com rudimentary/reliable option 2024-08-10 21:48:10 -04:00
A Holt
608d05e240
iiab-diagnostics: Try paste.centos.org instead of dpaste.com 2024-08-10 21:41:15 -04:00
A Holt
ee3781d38a
README.md: Fix link to FAQ app list / descriptions 2024-08-08 20:53:13 -04:00
A Holt
fdcb617677
Merge pull request #3785 from holta/kolibri-back-to-PPA
Revert to installing Kolibri (i.e. 0.17.0+) via PPA across the board, by default anyway, regardless whether or not Python >= 3.12
2024-08-08 00:03:59 -04:00
A Holt
0d0772aac9
Revert to installing Kolibri (i.e. 0.17.0+) via PPA, by default 2024-08-07 23:34:30 -04:00
A Holt
49b574409a
scripts/iiab-update: Touch up for PR #3784 2024-08-07 04:04:43 -04:00
A Holt
24def618bc
roles/iiab-admin/README.rst: Update 2 links 2024-08-07 03:34:02 -04:00
A Holt
8924349924
Merge pull request #3784 from holta/iiab-root-login
scripts/iiab-root-login: Set + Enable sftp password, for FileZilla uploads of local/community content to IIAB
2024-08-07 01:30:15 -04:00
root
cac1c873f4 scripts/iiab-root-login: Set + Enable sftp password, for FileZilla uploads 2024-08-07 01:08:52 -04:00
A Holt
aa5a020c16
Merge pull request #3783 from holta/kolibri-0.17.0
Kolibri 0.17.0 (final release process underway) if Python >= 3.12
2024-08-06 19:39:46 -04:00
A Holt
6e51ecbdd6
Kolibri 0.17.x: Clean/Clarify Python 3.12+ OS's / context 2024-08-06 19:37:56 -04:00
A Holt
fd3ff958b1
Kolibri 0.17.0 if Python >= 3.12 2024-08-06 19:29:48 -04:00
A Holt
13a25429ea
Merge pull request #3782 from holta/kolibri-0.17.0rc3
Kolibri 0.17 RC3 if Python >= 3.12
2024-08-05 18:52:46 -04:00
A Holt
0ab99a456e
kolibri/tasks/install.yml: Clarify 4 OS's now using Python 3.12 2024-08-05 18:51:04 -04:00
A Holt
01f87f5e38
Kolibri 0.17 RC3 if Python >= 3.12 2024-08-05 18:44:18 -04:00
A Holt
a0e789a111
pbx/README.adoc: FreePBX 17 links 2024-08-04 09:20:47 -04:00
A Holt
1c2548ed0c
Merge pull request #3780 from holta/kolibri-0.17.0rc2
Kolibri 0.17 RC2 if Python >= 3.12
2024-08-01 14:31:21 -04:00
A Holt
cd7baf4b4f
Kolibri 0.17 RC2 if Python >= 3.12 2024-08-01 14:19:53 -04:00
A Holt
06d3d537db
Merge pull request #3779 from holta/transmission-defer
Bypass initial install of Transmission on 24.04 & 24.10 & Linux Mint 22 [allowing smooth MEDIUM-sized & LARGE-sized IIAB installs]
2024-08-01 11:20:00 -04:00
root
f20493cdc4 Bypass initial install of Transmission on 24.04 & 24.10 & Mint 22 2024-08-01 11:10:37 -04:00
A Holt
6d2e5542a5
Merge pull request #3778 from holta/kolibri-0.17.0rc0
Kolibri 0.17 RC0 (Release Candidate 0) if Python >= 3.12
2024-07-30 19:48:23 -04:00
A Holt
1ddbf01dff
Kolibri 0.17 RC0 if Python >= 3.12 2024-07-30 19:42:47 -04:00
A Holt
8f1a72e049
pbx/README.adoc: Update FreePBX 17 pre-release news + link 2024-07-28 15:03:00 -04:00
A Holt
1116cbfb36
pbx/README.adoc: 2 more official FreePBX 17 install links 2024-07-28 14:48:01 -04:00
A Holt
078d896ef7
pbx/README.adoc: Link to official FreePBX 17 install script 2024-07-28 14:34:51 -04:00
A Holt
411240da74
Merge pull request #3777 from holta/cweb-git-pull-fix
'git pull' if upgrading Calibre-Web, bypassing Ansible's incomplete git module
2024-07-22 22:34:31 -04:00
root
4cb61cf8b8 'git pull' if upgrading Calibre-Web, bypassing Ansible 2024-07-22 22:26:35 -04:00
A Holt
dc6dae0b4c
Merge pull request #3776 from holta/kolibri-mainline
KA Lite is dying: Time for Kolibri to become mainline
2024-07-21 22:34:55 -04:00
root
46c1003f2c KA Lite dying: Time for Kolibri to become mainline 2024-07-21 21:49:07 -04:00
A Holt
ae2327e23a
Merge pull request #3775 from holta/iiab-update2
Improved upgrading of Calibre-Web via BOTH approaches: (1) `iiab-update -f` fast way, via bash (2) `iiab-update` slow/forcible/thorough way, via Ansible
2024-07-21 03:26:26 -04:00
root
220bea18dc Explain yt-dlp 'nightly' releases, in Ansible output 2024-07-21 03:24:26 -04:00
A Holt
ddfbbe7bf0
calibre-web/tasks/install.yml: Clarify yt-dlp "nightly" option 2024-07-21 02:46:48 -04:00
A Holt
663a35f5ce
Sharpen /usr/local/calibre-web-py3 disk usage estimates 2024-07-21 02:31:21 -04:00
root
06dbdb178a Allow Calibre-Web upgrades via Ansible too, much like 'iiab-update -f' 2024-07-21 01:51:06 -04:00
root
37c6a7ef29 Clarify yt-dlp "nightly" for better/experimental YouTube scraping 2024-07-20 13:43:35 -04:00
root
06a36706eb iiab-update: Tighten up Calibre-Web upgrader (WIP: Ansible equiv soon) 2024-07-20 11:52:53 -04:00
A Holt
dbce29b24e
Merge pull request #3774 from holta/iiab-update2
`iiab-update -f` installs Calibre-Web's latest requirements.txt + mentions alternative `iiab-update` w/o flags
2024-07-19 07:16:21 -04:00
root
33ed99c030 iiab-update -f: Install CWeb requirements.txt + sharpen warning 2024-07-19 06:26:19 -04:00
A Holt
b1b9d49327
Clean up RasPiOS Python/apt/pip doc links 2024-07-19 04:34:16 -04:00
A Holt
f73bce7935
Merge pull request #3773 from holta/iiab-update2
iiab-update: Skip Admin Console `./install` if it appears already up-to-date
2024-07-19 01:29:21 -04:00
root
af3660045f iiab-update: Skip Admin Console ./install if already up-to-date 2024-07-19 01:19:00 -04:00
A Holt
333dbf3be7
Merge pull request #3772 from holta/iiab-update2
iiab-update: Permit /opt/iiab/iiab untracked files like adm-run-roles-tmp.yml
2024-07-18 16:32:26 -04:00
A Holt
cdd94f84d9
iiab-update: Permit /opt/iiab/iiab untracked files like adm-run-roles-tmp.yml 2024-07-18 16:28:14 -04:00
A Holt
5debb5e650
Merge pull request #3771 from holta/iiab-update2
iiab-update: minor refinements for safety + usability
2024-07-18 16:04:30 -04:00
A Holt
732ddf8011
iiab-update: Clarify "cp -u" in live output too 2024-07-18 15:28:07 -04:00
A Holt
291c049919
iiab-update: Try "bash -e" (exit on error) and "cp -u" (--update) 2024-07-18 15:24:22 -04:00
A Holt
1b38d34a31
Merge pull request #3770 from holta/iiab-update2
Preload all of iiab-update (bash script) into RAM — serious/intermittent errors were arising from the script effectively overwriting itself
2024-07-18 14:39:57 -04:00
root
280cea8b9d untabify iiab-update + 'systemctl stop calibre-web' output 2024-07-18 14:36:01 -04:00
root
1e1998cb14 Preload all of iiab-update (bash script) into RAM for safety 2024-07-18 13:37:24 -04:00
A Holt
3d6a116352
scripts/iiab-update: Clarify summary/purpose for PR #3768 2024-07-18 05:19:38 -04:00
A Holt
cca3cd2395
Merge pull request #3769 from holta/yt-dlp_upgrading
Strengthen Calibre-Web's yt-dlp upgrading + document yt-dlp "nightly" version
2024-07-18 03:22:37 -04:00
A Holt
514f0ea714
calibre-web/README.rst: Refine "Upgrading" grammar 2024-07-18 03:21:01 -04:00
A Holt
4150ce342e
calibre-web/README.rst: Revise "Upgrading" section 2024-07-18 03:09:13 -04:00
A Holt
c6815a55f7
calibre-web/tasks/install.yml: Links to NEW iiab-update approach 2024-07-18 02:19:52 -04:00
A Holt
49f59830c8
Strengthen yt-dlp upgrading + document "nightly" version 2024-07-18 02:09:33 -04:00
A Holt
b1b42e958a
Merge pull request #3768 from holta/iiab-update
Very basic iiab-update command, that also upgrades IIAB Calibre-Web
2024-07-18 01:57:47 -04:00
A Holt
af4715df6a
Explain 'cp iiab-update iiab-summary iiab-diagnostics /usr/bin' 2024-07-18 01:32:16 -04:00
A Holt
7d004495d3
iiab-update: Document yt-dlp "nightly" option 2024-07-18 01:15:10 -04:00
A Holt
869ff84453
iiab-update: Tiny code cleanup (Calibre-Web section) 2024-07-18 00:25:50 -04:00
root
4f98de9331 Untracked files in venv /usr/local/calibre-web-py3 should NOT block upgrade 2024-07-17 23:38:02 -04:00
root
e3d9a9a36e Basic iiab-update command; also upgrades IIAB Calibre-Web 2024-07-17 22:26:11 -04:00
A Holt
fadee4caea
remote.it free/personal/non-commercial plan reconfirmed for 2024 2024-07-17 08:57:54 -04:00
A Holt
945d9c456f
Merge pull request #3767 from holta/kolibri-0.17.0b3
Kolibri 0.17.0 Beta 3 (if Python >= 3.12)
2024-07-16 00:35:12 -04:00
A Holt
89c3d78739
Kolibri 0.17.0 Beta 3 (if Python >= 3.12) 2024-07-16 00:33:24 -04:00
A Holt
e5ce5ca50a
Merge pull request #3766 from holta/ansible-core-7.2
Recommend ansible-core 2.17.2
2024-07-15 16:17:02 -04:00
A Holt
3b41fbca62
Recommend ansible-core 2.17.2 2024-07-15 16:12:49 -04:00
A Holt
2bb78b92a2
Merge pull request #3765 from holta/kolibri-0.17.0b2
Kolibri 0.17.0 Beta 2 (if Python >= 3.12)
2024-07-12 19:47:05 -04:00
A Holt
7c7f145b17
Kolibri 0.17.0 Beta 2 (if Python >= 3.12) 2024-07-12 19:44:36 -04:00
A Holt
8f63aec43a
Merge pull request #3763 from holta/kolibri-0.17b1
Kolibri 0.17.0 Beta 1 (if Python >= 3.12)
2024-07-11 19:27:38 -04:00
A Holt
2250f507fd
Kolibri 0.17.0 Beta 1 (if Python >= 3.12) 2024-07-11 19:18:26 -04:00
A Holt
afb7ed18fd
Update Moodle 4.5dev disk footprint estimates 2024-07-11 13:12:49 -04:00
A Holt
924f580277
Clarify current Moodle is 4.4 (or 4.5dev !) 2024-07-11 12:54:38 -04:00
A Holt
c1eea9d1a1
callbre-web/README.rst: Update issues reporting URL 2024-07-10 09:38:03 -04:00
A Holt
c6b0164cbe
transmission/README.rst: Ubuntu timeout / crashing issue #3756 2024-07-09 18:43:30 -04:00
A Holt
0c4e8d2cbb
Merge pull request #3761 from holta/kolibri-0.17b0
Install Kolibri 0.17 Beta 0 if Python >= 3.12
2024-07-03 23:20:55 -04:00
A Holt
9d31afdc9f
Install Kolibri 0.17b0 if Python >= 3.12 2024-07-03 23:18:07 -04:00
A Holt
fb918e7f2c
Merge pull request #3760 from holta/mediawiki-1.42.1
New MediaWiki 1.42.1
2024-06-27 12:03:10 -04:00
A Holt
a4a68604e1
New MediaWiki 1.42.1 2024-06-27 12:01:11 -04:00
A Holt
03610f8c35
Merge pull request #3759 from holta/kolibri-ppa-cleanup
Tighten up adding of Kolibri PPA
2024-06-25 18:58:07 -04:00
A Holt
d75d6a0cb2
Fix date in comment re: kolibri-proposed 2024-06-25 18:47:28 -04:00
A Holt
355ebbc65e
Tighten up adding of Kolibri PPA 2024-06-25 18:25:23 -04:00
A Holt
2ef70bf737
Merge pull request #3757 from holta/raspbian-13
Support experimental IIAB installs on Raspberry Pi OS 13 "Trixie"
2024-06-25 14:47:52 -04:00
root
199424d470 Support experimental install on RasPiOS 13 2024-06-25 14:35:19 -04:00
A Holt
2a5046cd84
Update IIAB Calibre-Web disk footprint estimates 2024-06-25 14:30:49 -04:00
A Holt
f274f36050
Clarify doc explanation of PR #3751 2024-06-25 13:10:01 -04:00
A Holt
29637bbb39
Merge pull request #3751 from holta/kolibri-on-python3.12
Install Kolibri 0.17 pre-release, when OS Python >= 3.12
2024-06-25 12:57:00 -04:00
A Holt
641b31d800
Nextcloud 29.0.3: Update disk footprint sizes 2024-06-25 12:56:33 -04:00
A Holt
2f4151ec2e
Temp hard-coding of Kolibri 0.17 Alpha 0, if Python >= 3.12 2024-06-25 11:55:31 -04:00
A Holt
c836694537
Merge pull request #3753 from holta/ansible-core-2.17.1
Recommend ansible-core 2.17.1
2024-06-17 14:54:01 -04:00
A Holt
da3a69a885
Recommend ansible-core 2.17.1 2024-06-17 14:48:43 -04:00
A Holt
db04024398
Merge pull request #3752 from holta/iiab-diagnostics_xklb_yt-dlp
Strengthen iiab-diagnostics for xklb & yt-dlp version number visibility
2024-06-15 08:57:42 -04:00
A Holt
2f83e7f266
iiab-diagnostics.README.md: Fix line number 2024-06-15 07:47:43 -04:00
A Holt
cc130d7e0f
iiab-diagnostics: xklb & yt-dlp version visibility 2024-06-15 07:45:54 -04:00
A Holt
7020423b6e
calibre-web/README.rst: Document xklb-metadata.db (for videos) 2024-06-14 09:14:23 -04:00
root
ddd09567e2 Kolibri on Python 3.12 OS's, during initial IIAB install 2024-06-13 14:32:15 -04:00
A Holt
27be239d9d
iiab-diagnostics: Tweak pastebinit syntax for PR #3749 2024-06-05 12:09:57 -04:00
A Holt
9b0ad93499
Merge pull request #3749 from holta/dpaste.com-fails-on-null-char
dpaste.com pastebin disallows null char — so make iiab-summary & iiab-diagnostics output safer (and force odd chars to be visible)
2024-06-05 09:35:00 -04:00
A Holt
14d605c643
iiab-diagnostics: Make all odd chars visible (pastebins can be picky!) 2024-06-05 09:24:29 -04:00
A Holt
b6ab7bf733
iiab-summary: Strip RPi model null char for dpaste.com 2024-06-05 09:18:32 -04:00
A Holt
7c44e2eb2f
Merge pull request #3748 from holta/dpaste.com-instead-of-sprunge.us
Let's try pastebin service dpaste.com (limited to 30 days, and ~1,000,000 characters unfortunately) — instead of problematic (flaky) sprunge.us
2024-06-04 10:24:14 -04:00
A Holt
17463eb810
iiab-diagnostics.README.md: sprunge.us -> dpaste.com 2024-06-04 10:21:20 -04:00
A Holt
ddca185401
iiab-diagnostics: try dpaste.com instead of sprunge.us 2024-06-04 10:20:02 -04:00
A Holt
9dc634f7de
calibre-web/tasks/install.yml: Refine venv tips 2024-05-31 00:27:54 -04:00
A Holt
1733512463
Merge pull request #3744 from holta/gitea-1.22
gitea/defaults/main.yml: gitea_version: "1.22"
2024-05-27 10:22:06 -04:00
A Holt
ed9c892946
gitea/defaults/main.yml: gitea_version: "1.22" 2024-05-27 10:19:50 -04:00
A Holt
ec4a884c4c
ansible-core 2.17 docs for PR #3743 2024-05-20 15:17:55 -04:00
A Holt
0cbfeec360
Merge pull request #3743 from holta/ansible-core-2.17.0
Recommend ansible-core 2.17.0
2024-05-20 15:13:13 -04:00
A Holt
6b80af6832
2.14 EOL, MIN_ANSIBLE_VER=2.15.12 2024-05-20 14:53:10 -04:00
A Holt
daafd61521
Recommend ansible-core 2.17.0 2024-05-20 14:51:21 -04:00
A Holt
a8ebf0c300
Merge pull request #3741 from holta/kolibri-block
Defer initial install of Kolibri on Ubuntu 24.04+ (for now!) awaiting Python 3.12 compatibility
2024-05-16 18:20:29 -04:00
A Holt
583fa9a898
Clarify Kolibri avoidance w/ Python 3.12+ during initial iiab-install 2024-05-16 18:19:42 -04:00
root
2788f10624 Safer avoidance of Kolibri, if Python 3.12+ (for now!) 2024-05-16 18:07:26 -04:00
root
9129644dff Avoid initial install of Kolibri on Ubuntu 24.04+ (for now!) 2024-05-16 17:24:27 -04:00
A Holt
485a619bfa
Merge pull request #3738 from holta/nodejs22
Transition to Node.js 22.x
2024-05-03 09:12:04 -04:00
root
d4c97f45b0 Node.js 22.x 2024-05-03 08:50:27 -04:00
A Holt
673fff90e2
Nextcloud 29: Update disk footprint sizes 2024-05-01 23:29:00 -04:00
A Holt
ff696899f3
CUPS: Update Ansible password hashing link (#3735) 2024-05-01 22:52:44 -04:00
A Holt
92a4d7543e
Merge pull request #3735 from holta/ansible217
'echo Admin:changeme | chpasswd' for CUPS w/ ansible-core 2.17+
2024-05-01 16:10:05 -04:00
root
ebb0e079af 'echo Admin:changeme | chpasswd' for CUPS w/ ansible-core 2.17+ 2024-05-01 15:52:06 -04:00
A Holt
d79822146e
Merge pull request #3734 from holta/ubuntu2410
Welcome Ubuntu 24.10 (Oracular Oriole) pre-releases
2024-05-01 10:45:01 -04:00
root
4ea8690dd3 Welcome Ubuntu 24.10 (Oracular Oriole) pre-releases 2024-05-01 10:31:09 -04:00
A Holt
4dcd8d8823
Merge pull request #3733 from holta/kalite-block
Bypass KA Lite install during initial install of IIAB, on recent OS's like Ubuntu 24.04+
2024-04-30 21:25:14 -04:00
root
a771260ce9 Bypass KA Lite install during initial install of IIAB, on recent OS's 2024-04-30 21:02:25 -04:00
A Holt
04cef50665
Merge pull request #3732 from holta/yt-dlp_paths
Safer /usr/local/bin/yt-dlp symlink creation
2024-04-30 18:44:04 -04:00
root
e6d5b6aa07 Safer /usr/local/bin/yt-dlp symlink creation 2024-04-30 18:22:34 -04:00
A Holt
b3668e42e9
Merge pull request #3730 from holta/moodle-4.4
New Moodle 4.4 instead of 4.3
2024-04-24 11:01:03 -04:00
A Holt
81be4dda9a
New Moodle 4.4 instead of 4.3 2024-04-24 10:34:32 -04:00
A Holt
61fa20ee64
Merge pull request #3729 from holta/ansible-core-2.16.6
Recommend ansible-core 2.16.6
2024-04-15 22:23:22 -04:00
A Holt
e279be79df
iiab-install: MIN_ANSIBLE_VER=2.14.16 2024-04-15 22:17:51 -04:00
A Holt
8079ca9a4b
Recommend ansible-core 2.16.6 2024-04-15 22:13:32 -04:00
A Holt
6f83c550de
Merge pull request #3728 from holta/sugarizer-1.8.0
New Sugarizer 1.8.0 (upgrade from 1.7.0)
2024-04-10 16:06:17 -04:00
A Holt
d6c4812343
Sugarizer 1.8.0 (upgrade from 1.7.0!) 2024-04-10 16:04:04 -04:00
A Holt
1018187e10
Merge pull request #3726 from holta/kolibri-via-apt
Restore apt install of Kolibri 0.16.1+, thx to upstream changes
2024-04-08 16:34:28 -04:00
A Holt
824469e280
kolibri/defaults/main.yml: Clarify apt for Kolibri 0.16.1+ 2024-04-08 11:54:59 -04:00
A Holt
812b549d33
Restore apt install of Kolibri 0.16.1+, thx to upstream changes 2024-04-08 11:48:53 -04:00
A Holt
20a48b3de0
Merge pull request #3725 from holta/mediawiki-1.41.1
MediaWiki 1.41.1 (security and maintenance release)
2024-03-28 19:08:38 -04:00
A Holt
837b4ccaff
MediaWiki 1.41.1 (security and maintenance release) 2024-03-28 19:07:51 -04:00
A Holt
fde199037a
Merge pull request #3723 from holta/ansible-core-2.16.5
Recommend ansible-core 2.16.5
2024-03-25 15:58:00 -04:00
A Holt
133cc0682b
iiab-install: Mandate MIN_ANSIBLE_VER=2.14.15 2024-03-25 15:49:14 -04:00
A Holt
9ce709e6e3
Recommend ansible-core 2.16.5 2024-03-25 15:47:52 -04:00
A Holt
2c6b565042
Merge pull request #3722 from holta/kolibri-force-0.16-for-now
Interim stub to force Kolibri 0.16.0 for now, awaiting upstream #11892
2024-03-17 13:35:04 -04:00
A Holt
ea47f27b9d
kolibri/defaults/main.yml: Clarify 0.16.0 install hack/stub 2024-03-17 13:31:28 -04:00
A Holt
b5e60c9875
Interim stub to force Kolibri 0.16.0 for now, awaiting upstream #11892 2024-03-17 13:24:08 -04:00
A Holt
4fb55f87c6
iiab-install: Mandate MIN_ANSIBLE_VER=2.14.14 2024-03-07 04:04:05 -05:00
A Holt
6860ede1ad
Merge pull request #3718 from holta/py2-better
Fix accidental running of install_python2.sh (also) being run on Ubuntu 24.04 (and introduce var is_linuxmint_22)
2024-03-07 03:50:29 -05:00
root
1070a3e729 install_python2_kalite-venv_u2404.sh: 'apt install python3-venv' (again) 2024-03-07 03:28:40 -05:00
root
a98d02248e kalite/tasks/install.yml: Cleaner OS conditions 2024-03-07 02:06:32 -05:00
root
f67660d30b Tighten kalite/tasks/install.yml; Introduce is_linuxmint_22 2024-03-07 00:53:46 -05:00
A Holt
92e70fc0bc
Merge pull request #3717 from holta/py2-tweaks
Tiny refinements for scripts/install_python2_kalite-venv_u2404.sh
2024-03-06 20:31:44 -05:00
root
f8fe9f0af9 Refine scripts/install_python2_kalite-venv_u2404.sh 2024-03-06 19:57:05 -05:00
A Holt
e990395fc6
Merge pull request #3715 from holta/py2
Touch-ups for: scripts/install_python2_kalite-venv_u2404.sh
2024-03-06 14:21:49 -05:00
root
73e94abe3f Touch-ups for: scripts/install_python2_kalite-venv_u2404.sh 2024-03-06 13:26:47 -05:00
Jerry Vonau
6819123fed no compilers 2024-03-05 21:06:59 -06:00
Jerry Vonau
f871683c2d conditionals 2024-03-05 05:02:18 -06:00
Jerry Vonau
66eb9862ee exec bit not set in git 2024-03-04 01:46:43 -06:00
Jerry Vonau
a737c8c05a leave python2 packages 2024-03-04 01:41:57 -06:00
Jerry Vonau
5fc4952595 U2404 python2 role 2024-03-04 01:28:11 -06:00
Jerry Vonau
3ae591a035 U2404 python2 2024-03-04 00:55:09 -06:00
Jerry Vonau
918758fbe9 U2404 python2 2024-03-04 00:52:48 -06:00
A Holt
92fd9a47ae
Merge pull request #3713 from holta/ansible-core-2.16.4
Recommend ansible-core 2.16.4
2024-02-26 16:58:33 -05:00
A Holt
c3e7b4c104
Recommend ansible-core 2.16.4 2024-02-26 16:53:58 -05:00
A Holt
7a6ca96738
runrole: Clarify/correct local_vars.yml warning 2024-02-26 09:36:24 -05:00
A Holt
dabd4ad7fe
Merge pull request #3712 from holta/pbx-doc-clean
Update FreePBX 17 BETA install tips
2024-02-25 20:15:13 -05:00
A Holt
ddfc2b003a
local_vars_large.yml: Update PBX tips 2024-02-25 20:13:27 -05:00
A Holt
5320b4e891
local_vars_medium.yml: Update PBX tips 2024-02-25 20:12:43 -05:00
A Holt
586364bd89
local_vars_small.yml: Update PBX tips 2024-02-25 20:12:04 -05:00
A Holt
731829f199
local_vars_unittest.yml: Update PBX tips 2024-02-25 20:11:25 -05:00
A Holt
7991d48614
default_vars.yml: Update PBX tips 2024-02-25 20:10:47 -05:00
A Holt
e6bf0ef177
pbx/README.adoc: Link to PR #3675 (Asterisk 21 & FreePBX 17) 2024-02-25 18:05:49 -05:00
A Holt
b5f3f44e96
pbx/README.adoc: Require PHP 8.x (desupport EOL'd PHP 7.4!) 2024-02-25 18:03:58 -05:00
A Holt
81aca5f603
Merge pull request #3675 from holta/asterisk21+freepbx17
pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 again in Q1/Q2 2024? [GOOD NEWS: FreePBX 17 BETA now tolerates Asterisk 21!]
2024-02-25 17:36:40 -05:00
A Holt
65d6f9255e
WARNING: FreePBX 17.0 branch is still in flux! 2024-02-25 17:26:27 -05:00
A Holt
98d5122404
18+1 FreePBX modules appear unchanged since May 2022 2024-02-25 17:23:31 -05:00
A Holt
7c24fcc695
freepbx.yml: Consistent uppercase, documenting 2 hack/workarounds 2024-02-25 16:21:20 -05:00
A Holt
efc9705b1a
2 ugly hacks for FreePBX 17: ignore 'install -n' error code & bypass 'fwconsole reload' 2024-02-25 16:19:27 -05:00
A Holt
3455b6b848
kolibri/tasks/main.yml: New pre-release option (kolibri-deb-next) 2024-02-20 16:48:30 -05:00
A Holt
7e88735445
Merge pull request #3708 from holta/wifi-driver-removal
1-prep/tasks/hardware.yml: Comment out "NUC6" WiFi driver
2024-02-09 08:58:40 -05:00
A Holt
a852541ad4
1-prep/tasks/hardware.yml: Comment out "NUC6" WiFi driver 2024-02-09 08:48:23 -05:00
A Holt
7d73fca112
Merge pull request #3703 from holta/ansible-core-2.16.3
Recommend ansible-core 2.16.3
2024-01-29 15:59:59 -05:00
A Holt
6776c1d4a5
Recommend ansible-core 2.16.3 2024-01-29 15:57:24 -05:00
Tim Moody
4ebcf6a248
Merge pull request #3702 from tim-moody/8.1.1-none
another auto install of a pet project
2024-01-21 10:50:03 -05:00
tim-moody
961acf9454 another auto install of a pet project 2024-01-21 10:46:33 -05:00
A Holt
ebb8368548
Merge pull request #3701 from holta/iiab-diagnostics_sudo_for_cweb_version
iiab-diagnostics: sudo git log for Calibre-Web version
2024-01-20 14:58:12 -05:00
A Holt
bd340aa673
iiab-diagnostics: sudo git log for Calibre-Web version 2024-01-20 14:53:24 -05:00
A Holt
f23aa77af1
Merge pull request #3700 from holta/iiab-diagnostics_cat_-v
iiab-diagnostics: Pipe everything thru 'cat -v' so ASCII control chararcters become visible
2024-01-20 13:50:33 -05:00
root
2ed820777d iiab-diagnostics: Pipe everything thru 'cat -v' so control chars visible 2024-01-20 13:45:17 -05:00
A Holt
54badceae4
Merge pull request #3699 from holta/app.db-new-defaults
Update (almost 10!) Calibre-Web app.db defaults
2024-01-18 22:51:08 -05:00
root
595de4e7f2 Update (almost 10!) Calibre-Web app.db defaults 2024-01-18 22:35:58 -05:00
A Holt
26ddda9b7e
Merge pull request #3698 from holta/iiab-diagnostics_xklb.log
iiab-diagnostics: 300 last lines of /var/log/xklb.log for now
2024-01-15 00:04:22 -05:00
A Holt
524709f31a
iiab-diagnostics: 300 last lines of xklb.log for now 2024-01-14 23:55:38 -05:00
A Holt
4ae5991cb3
pbx/README.adoc: WARN re: PHP 7 danger & unsupported/old OS's 2024-01-13 12:36:02 -05:00
A Holt
5a44399300
Update pbx/README.adoc w/ latest FreePBX 17 BETA tips / warning 2024-01-13 12:23:57 -05:00
A Holt
d932684a11
iiab-diagnostics.README.md: Fix line number for PR #3697 2024-01-11 18:12:15 -05:00
A Holt
0f6231ab38
Merge pull request #3697 from holta/iiab-diagnostics_cweb_commits
iiab-diagnostics: Show Calibre-Web "version" (~50 recent commits) + systemd service status + 3 "log files"
2024-01-11 14:50:57 -05:00
A Holt
bed26162cf
iiab-diagnostics: Also include 'systemctl status calibre-web' 2024-01-11 14:37:00 -05:00
A Holt
fea5f9ccba
iiab-diagnostics: Add 3 more "log files" for Calibre-Web 2024-01-11 14:31:32 -05:00
A Holt
1c43253062
iiab-diagnostics: Show Calibre-Web "version" i.e. ~50 recent commits 2024-01-11 14:20:40 -05:00
A Holt
9570f8d117
calibre-web/tasks/install.yml: Clarify wiki for PR #3696 2024-01-10 23:38:21 -05:00
A Holt
b6975d0c8b
Merge pull request #3696 from holta/lb-wrapper.greedy_gone
calibre-web/tasks/install.yml: lb-wrapper.greedy gone!
2024-01-10 23:31:28 -05:00
A Holt
cc9d791f6c
calibre-web/tasks/install.yml: Link to wiki explanation 2024-01-10 23:30:05 -05:00
A Holt
40c2c71f52
calibre-web/tasks/install.yml: lb-wrapper.greedy gone! 2024-01-10 23:23:15 -05:00
A Holt
42d580ef65
Merge pull request #3695 from holta/calibre-web_on_SMALL-sized
Install/enable Calibre-Web by default, e.g. with SMALL-sized IIAB installs too
2024-01-01 13:12:49 -05:00
A Holt
0cbbd09db8
local_vars_small.yml: Install/enable Calibre-Web 2024-01-01 13:09:56 -05:00
A Holt
71220324f3
default_vars.yml: Install/enable Calibre-Web 2024-01-01 13:09:15 -05:00
A Holt
64e6d6cd04
Merge pull request #3694 from holta/calibre-web_with_videos
Calibre-Web (eBook Library) w/ experimental support for video/audio/images
2024-01-01 00:06:35 -05:00
A Holt
7887e4f8cb
Touch up calibre-web/README.rst 2023-12-31 23:57:58 -05:00
root
ebf35d9680 Calibre-Web w/ experimental support for video/audio/images 2023-12-31 23:45:25 -05:00
A Holt
cbae5b71ea
Merge pull request #3693 from holta/launch-8.2-cycle
default_vars.yml: Launch 8.2 Release Cycle
2023-12-31 22:58:03 -05:00
A Holt
aba3cde8e4
default_vars.yml: Launch 8.2 release cycle 2023-12-31 22:56:48 -05:00
A Holt
f2fd0fda9a
pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 2023-11-20 02:33:15 -05:00
144 changed files with 1999 additions and 671 deletions

View file

@ -1,4 +1,4 @@
name: '"10 min" IIAB test install'
name: '"10 min" IIAB on Ubuntu 24.04 on x86-64'
# run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
# https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/ci-cd/github-actions/triggers.html
@ -18,7 +18,7 @@ on: [push, pull_request, workflow_dispatch]
jobs:
test-install:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
@ -27,7 +27,7 @@ jobs:
# GITHUB_CONTEXT: ${{ toJSON(github) }}
# run: echo "$GITHUB_CONTEXT"
- name: Check out repository code
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: GitHub Actions "runner" environment
run: |

View file

@ -1,4 +1,4 @@
name: '"30 min" IIAB test install deb12 on rpi3'
name: '"30 min" IIAB on Debian 12 on RPi 3'
# run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
# https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/ci-cd/github-actions/triggers.html
@ -18,7 +18,7 @@ on: [push, pull_request, workflow_dispatch]
jobs:
test-install:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
arch: [debian12]

View file

@ -1,4 +1,4 @@
name: '"30 min" IIAB test install raspios'
name: '"30 min" IIAB on RasPiOS on Zero 2 W'
# run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
# https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/ci-cd/github-actions/triggers.html
@ -18,7 +18,7 @@ on: [push, pull_request, workflow_dispatch]
jobs:
test-install:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
arch: [aarch64] #[zero_raspbian, zero_raspios, zero2_raspios, aarch64]
@ -65,13 +65,13 @@ jobs:
uname -a # uname -srm
whoami # Typically 'root' instead of 'runner'
pwd # /home/runner/work/iiab/iiab == $GITHUB_WORKSPACE == ${{ github.workspace }}
sudo apt-get update -y --allow-releaseinfo-change
sudo apt-get install --no-install-recommends -y git
apt-get update -y --allow-releaseinfo-change
apt-get install --no-install-recommends -y git
ls /opt/iiab/iiab
sudo mkdir /etc/iiab
sudo cp /opt/iiab/iiab/vars/local_vars_none.yml /etc/iiab/local_vars.yml
sudo /opt/iiab/iiab/scripts/ansible
sudo ./iiab-install
mkdir /etc/iiab
cp /opt/iiab/iiab/vars/local_vars_none.yml /etc/iiab/local_vars.yml
/opt/iiab/iiab/scripts/ansible
./iiab-install
cd /opt/iiab/iiab
iiab-summary
cat /etc/iiab/iiab_state.yml

View file

@ -1,3 +1,3 @@
# SEE THE NEW<br>[github.com/iiab/iiab/wiki/Technical-Contributors-Guide](https://github.com/iiab/iiab/wiki/Technical-Contributors-Guide)
# SEE THE NEW<br>[github.com/iiab/iiab/wiki/Contributors-Guide-(EN)](https://github.com/iiab/iiab/wiki/Contributors-Guide-(EN))
# THANKS!

View file

@ -15,6 +15,6 @@ this is to include the following two lines at the top of the file:
Licensed under the terms of the GNU GPL v2 or later; see LICENSE for details.
All files not containing an explicit copyright notice or terms of license in
the file are Copyright © 2015-2024, Unleash Kids, and are licensed under the
the file are Copyright © 2015-2025, Unleash Kids, and are licensed under the
terms of the GPLv2 license in the file named LICENSE in the root of the
repository.

View file

@ -9,7 +9,7 @@ You can build your own tiny, affordable server (an offline digital library) for
Internet-in-a-Box gives you the DIY tools to:
1. Download then drag-and-drop to arrange the [very best of the Worlds Free Knowledge](https://internet-in-a-box.org/#quality-content).
2. Choose among [30+ powerful educational apps](https://wiki.iiab.io/go/FAQ#What_services_.28IIAB_apps.29_are_suggested_during_installation%3F) for your school or learning/teaching community, optionally with a complete LMS (learning management system).
2. Choose among [30+ powerful educational apps](https://wiki.iiab.io/go/FAQ#What_services_%28IIAB_apps%29_are_suggested_during_installation%3F) for your school or learning/teaching community, optionally with a complete LMS (learning management system).
3. Exchange local/indigenous knowledge with nearby communities, using our [Manage Content](https://github.com/iiab/iiab-admin-console/blob/master/roles/console/files/help/InstContent.rst#manage-content) interface and possible mesh networking.
FYI this [community product](https://en.wikipedia.org/wiki/Internet-in-a-Box) is enabled by professional volunteers working [side-by-side](https://wiki.iiab.io/go/FAQ#What_are_the_best_places_for_community_support%3F) with schools, clinics and libraries around the world. *Thank you for being a part of our http://OFF.NETWORK grassroots technology [movement](https://meta.wikimedia.org/wiki/Internet-in-a-Box)!*
@ -18,7 +18,7 @@ FYI this [community product](https://en.wikipedia.org/wiki/Internet-in-a-Box) is
Install Internet-in-a-Box (IIAB) from: [**download.iiab.io**](https://download.iiab.io/)
Please see [FAQ.IIAB.IO](https://wiki.iiab.io/go/FAQ) which has 40+ questions and answers to help you along the way (e.g. [“Is a quick installation possible?”](https://wiki.iiab.io/go/FAQ#Is_a_quick_installation_possible%3F)) as you put together the <!--digital--> “local learning hotspot” most suitable for your own teaching/learning community. Here are 2 ways to install IIAB:
Please see [FAQ.IIAB.IO](https://wiki.iiab.io/go/FAQ) which has 50+ questions and answers to help you along the way (e.g. [“Is a quick installation possible?”](https://wiki.iiab.io/go/FAQ#Is_a_quick_installation_possible%3F)) as you put together the <!--digital--> “local learning hotspot” most suitable for your own teaching/learning community. Here are 2 ways to install IIAB:
- Our [1-line installer](https://download.iiab.io/) gets you the very latest, typically within about an hour, on [different Linux distributions](https://github.com/iiab/iiab/wiki/IIAB-Platforms#operating-systems).
- [Prefab disk images](https://github.com/iiab/iiab/wiki/Raspberry-Pi-Images-~-Summary#iiab-images-for-raspberry-pi) ([.img files](https://archive.org/search.php?query=iiab%20.img&sort=-publicdate)) are sometimes a few months out of date, but can be flashed directly onto a microSD card, for insertion into Raspberry Pi.
@ -35,7 +35,7 @@ Finally, you can [customize your Internet-in-a-Box home page](https://wiki.iiab.
Global community updates and videos are regularly posted to: **[@internet_in_box](https://twitter.com/internet_in_box)**
_Internet-in-a-Box (IIAB) greatly welcomes contributions from educators, librarians and [IT/UX/QA people](https://github.com/iiab/iiab/wiki/Technical-Contributors-Guide) of all kinds!_
_Internet-in-a-Box (IIAB) greatly welcomes contributions from educators, librarians and [IT/UX/QA people](https://github.com/iiab/iiab/wiki/Contributors-Guide-(EN)) ([versión en español](https://github.com/iiab/iiab/wiki/Gu%C3%ADa-para-Contribuidores-(ES))) of all kinds!_
If you would like to volunteer, please [make contact](https://internet-in-a-box.org/contributing.html) after looking over [“How can I help?”](https://wiki.iiab.io/go/FAQ#How_can_I_help%3F) at: [FAQ.IIAB.IO](https://wiki.iiab.io/go/FAQ)

View file

@ -5,4 +5,4 @@
# Disallowed by Ansible 2.11+ -- see https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.7.html#using-a-loop-on-a-package-module-via-squash-actions
#squash_actions = apk, apt, dnf, homebrew, openbsd_pkg, pacman, pkgng, yum, zypper, package
[defaults]
interpreter_python=/usr/bin/python3
interpreter_python=/usr/local/ansible/bin/python3

View file

@ -11,7 +11,7 @@ CWD=`pwd`
OS=`grep ^ID= /etc/os-release | cut -d= -f2`
OS=${OS//\"/} # Remove all '"'
MIN_RPI_KERN=5.4.0 # Do not use 'rpi-update' unless absolutely necessary: https://github.com/iiab/iiab/issues/1993
MIN_ANSIBLE_VER=2.14.13 # 2023-05-22: ansible-core 2.12 EOL per https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix 2022-11-09: Raspberry Pi 3 (and 3 B+ etc?) apparently install (and require?) ansible-core 2.11 for now -- @deldesir can explain more on PR #3419. Historical: Ansible 2.8.3 and 2.8.6 had serious bugs, preventing their use with IIAB.
MIN_ANSIBLE_VER=2.16.14 # 2024-11-08: ansible-core 2.15 EOL is November 2024 per https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix 2022-11-09: Raspberry Pi 3 (and 3 B+ etc?) apparently install (and require?) ansible-core 2.11 for now -- @deldesir can explain more on PR #3419. Historical: Ansible 2.8.3 and 2.8.6 had serious bugs, preventing their use with IIAB.
REINSTALL=false
DEBUG=false

View file

@ -42,7 +42,7 @@ fi
echo "Ansible will now run iiab-network.yml -- log file is iiab-network.log"
Start=`date`
ansible -m setup -i ansible_hosts localhost --connection=local | grep python
ansible-playbook -i ansible_hosts iiab-network.yml --connection=local
ansible-playbook -i ansible_hosts iiab-network.yml --extra-vars "{\"skip_role_on_error\":false}" --connection=local
End=`date`

View file

@ -8,7 +8,7 @@
# apache_interface: 127.0.0.1
# Make this False to disable http://box/common/services/power_off.php button:
# apache_allow_sudo: True
# allow_www_data_poweroff: False
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!

View file

@ -34,14 +34,23 @@
# Copies the latest/known version of iiab-diagnostics into /usr/bin (so it can
# be run even if local source tree /opt/iiab/iiab is deleted to conserve disk).
- name: Copy iiab-summary & iiab-diagnostics from /opt/iiab/iiab/scripts/ to /usr/bin/
- name: Copy iiab-update & iiab-summary & iiab-diagnostics & iiab-root-login from /opt/iiab/iiab/scripts/ to /usr/bin/
copy:
src: "{{ iiab_dir }}/scripts/{{ item }}"
dest: /usr/bin/
mode: '0755'
with_items:
- iiab-update
- iiab-summary
- iiab-diagnostics
- iiab-root-login
- name: Symlink /usr/bin/iiab-upgrade -> /usr/bin/iiab-update
file:
src: /usr/bin/iiab-update
path: /usr/bin/iiab-upgrade
state: link
#force: yes
- name: Create globally-writable directory /etc/iiab/diag (0777) so non-root users can run 'iiab-diagnostics'
file:

View file

@ -71,7 +71,8 @@
- dnsmasq
- bluetooth
- sshd
- openvpn
#- openvpn # Deprecated
- tailscale
- remoteit
- admin_console
#- nginx # MANDATORY

View file

@ -6,7 +6,7 @@ https://github.com/iiab/iiab/wiki/IIAB-Contributors-Guide#ansible[stage]
hardware, low-level OS quirks, and basic security:
* SSHD
* OpenVPN if/as needed later for remote support
* Tailscale if/as needed later for remote support
* https://github.com/iiab/iiab/tree/master/roles/iiab-admin#iiab-admin-readme[iiab-admin]
username and group, to log into Admin Console
* dnsmasq (install now, configure later!)

View file

@ -7,17 +7,18 @@
when: first_run and rpi_model != "none"
- name: Check if the identifier for Intel's NUC6 built-in WiFi is present
shell: "lsusb | grep 8087:0a2b | wc | awk '{print $1}'"
register: usb_NUC6
ignore_errors: True
- name: Download {{ iiab_download_url }}/iwlwifi-8000C-13.ucode to /lib/firmware for built-in WiFi on NUC6
get_url:
url: "{{ iiab_download_url }}/iwlwifi-8000C-13.ucode" # https://download.iiab.io/packages
dest: /lib/firmware
timeout: "{{ download_timeout }}"
when: usb_NUC6.stdout|int > 0
# 2024-02-09: Code below appears stale for Shanti's #3707 hardware
#- name: Check if the identifier for Intel's NUC6 built-in WiFi is present
# shell: "lsusb | grep 8087:0a2b | wc | awk '{print $1}'"
# register: usb_NUC6
# ignore_errors: True
#
#- name: Download {{ iiab_download_url }}/iwlwifi-8000C-13.ucode to /lib/firmware for built-in WiFi on NUC6
# get_url:
# url: "{{ iiab_download_url }}/Old/iwlwifi-8000C-13.ucode" # https://download.iiab.io/packages
# dest: /lib/firmware
# timeout: "{{ download_timeout }}"
# when: usb_NUC6.stdout|int > 0
- name: "Look for any WiFi devices present: ls -la /sys/class/net/*/phy80211 | cut -d/ -f5"

View file

@ -3,22 +3,22 @@
- name: ...IS BEGINNING ============================================
meta: noop
- name: SSHD -- required by OpenVPN below -- also run by roles/4-server-options/tasks/main.yml
- name: SSHD
include_role:
name: sshd
when: sshd_install
- name: OPENVPN
- name: TAILSCALE (VPN)
include_role:
name: openvpn
when: openvpn_install
name: tailscale
when: tailscale_install
- name: REMOTE.IT
include_role:
name: remoteit
when: remoteit_install
- name: IIAB-ADMIN -- includes roles/iiab-admin/tasks/access.yml
- name: IIAB-ADMIN -- includes {lynx, screen, sudo-prereqs.yml, admin-user.yml, pwd-warnings.yml}
include_role:
name: iiab-admin
#when: iiab_admin_install # Flag might be created in future?

View file

@ -29,7 +29,6 @@
- rsync # 351kB download: RasPiOS installs this regardless
#- screen # 551kB download: Installed by 1-prep's roles/iiab-admin/tasks/main.yml
- sqlite3 # 1054kB download
#- sudo # 991kB download: RasPiOS installs this regardless -- (2) Can also be installed by roles/1-prep's roles/openvpn/tasks/install.yml, (3) Is definitely installed by 1-prep's roles/iiab-admin/tasks/sudo-prereqs.yml
- tar # 799kB download: RasPiOS installs this regardless
- unzip # 151kB download: RasPiOS installs this regardless
#- usbmount # 18kB download: Moved to roles/usb_lib/tasks/install.yml

View file

@ -19,11 +19,6 @@
#when: pylibs_installed is undefined
#when: pylibs_install # Flag might be created in future?
- name: SSHD -- also run by roles/1-prep/tasks/main.yml as required by OpenVPN
include_role:
name: sshd
when: sshd_install
- name: Install Bluetooth - only on Raspberry Pi
include_role:
name: bluetooth

View file

@ -6,12 +6,13 @@
- name: KALITE
include_role:
name: kalite
when: kalite_install
when: kalite_install and (is_ubuntu_2204 or is_ubuntu_2310 or is_debian_12) # Also covers is_linuxmint_21 and is_raspbian_12
- name: KOLIBRI
include_role:
name: kolibri
when: kolibri_install
#when: kolibri_install and python_version is version('3.12', '<') # Debian 13 still uses Python 3.11 (for now!) so really this just avoids Ubuntu 24.04 and 24.10 pre-releases during initial iiab-install. CLARIF: This is all TEMPORARY until learningequality/kolibri#11316 brings Python 3.12 support to Kolibri 0.17 pre-releases (expected very soon).
- name: KIWIX
include_role:

View file

@ -6,7 +6,7 @@
- name: TRANSMISSION
include_role:
name: transmission
when: transmission_install
when: transmission_install and not (is_ubuntu_2404 or is_ubuntu_2410 or is_ubuntu_2504) # Also excludes is_linuxmint_22, for #3756 (whereas Debian 13 works great!)
- name: AWSTATS
include_role:

View file

@ -25,9 +25,9 @@ download e-books using a
Teachers upload e-books, adjust e-book metadata, and create custom "bookshelf"
collections — to help students build the best local community library!
**NEW AS OF DECEMBER 2023: If you install** `IIAB's new version of Calibre-Web <https://github.com/iiab/calibre-web/wiki>`_
**then you can also add YouTube and Vimeo videos (ETC) to your community or
family's learning library!**
**NEW AS OF JANUARY 2024:** `IIAB's experimental new version of Calibre-Web <https://github.com/iiab/calibre-web/wiki>`_
**also lets you add YouTube and Vimeo videos (and local videos, e.g. from
teachers' phones) to expand your indigenous/local/family learning library!**
.. image:: https://www.yankodesign.com/images/design_news/2019/05/221758/luo_beetle_library_8.jpg
@ -108,6 +108,10 @@ Whereas your e-book metadata is stored in a Calibre-style database::
/library/calibre-web/metadata.db
Videos' metadata is stored in database::
/library/calibre-web/xklb-metadata.db
See also::
/library/calibre-web/metadata_db_prefs_backup.json
@ -153,26 +157,31 @@ as it contains your Calibre-Web content **and** configuration settings!
Upgrading
---------
"Reinstalling" Calibre-Web automatically installs the latest version — if your
Internet-in-a-Box (IIAB) is online.
Please see our `new/automated upgrade technique (iiab-update) <https://github.com/iiab/calibre-web/wiki#upgrading>`_
introduced in July 2024.
But first: back up your content **and** configuration settings, as explained above.
But first: back up your content **and** configuration settings, as outlined
above!
**Also move your /library/calibre-web/config/app.db AND/OR
/library/calibre-web/metadata.db out of the way — if you're sure you want to
fully reset your Calibre-Web settings (to install defaults) AND/OR remove all
e-book metadata! Then run, as root**::
**Conversely if you're sure you want to fully reset your Calibre-Web settings,
and remove all existing e-book/video/media metadata — then move your
/library/calibre-web/config/app.db, /library/calibre-web/metadata.db and
/library/calibre-web/xklb-metadata.db out of the way.**
RECAP: Either way, "reinstalling" Calibre-Web automatically installs the latest
version — so long as your Internet-in-a-Box (IIAB) is online. Most people
should stick with the new ``iiab-update`` technique above. However if you must
use the older/manual approach, you would need to run, as root::
cd /opt/iiab/iiab
./runrole --reinstall calibre-web
Or, if you just want to upgrade Calibre-Web code alone, prior to proceeding
manually::
Or, if there's a need to try updating Calibre-Web's code alone::
cd /usr/local/calibre-web-py3
git pull
This older way is *no longer recommended*::
Finally, this much older way is *no longer recommended*::
cd /opt/iiab/iiab
./iiab-install --reinstall # OR: ./iiab-configure
@ -224,5 +233,5 @@ Known Issues
* |ss| Upload of not supported file formats gives no feedback to the user: `janeczku/calibre-web#828 <https://github.com/janeczku/calibre-web/issues/828>`_ |se| |nbsp| Fixed by `361a124 <https://github.com/janeczku/calibre-web/commit/361a1243d732116e6f520fabbaae017068b86037>`_ on 2019-02-27.
* *Please assist us in reporting serious issues here:*
https://github.com/janeczku/calibre-web/issues
* *Please report serious issues here:*
https://github.com/iiab/calibre-web/issues

View file

@ -14,7 +14,7 @@
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
calibreweb_repo_url: https://github.com/janeczku/calibre-web
calibreweb_repo_url: https://github.com/iiab/calibre-web # Or use upstream: https://github.com/janeczku/calibre-web
calibreweb_version: master # WAS: master, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8, 0.6.9
calibreweb_venv_wipe: False # 2023-12-04: NEW default TDD (Test-Driven Dev!)

Binary file not shown.

View file

@ -1,13 +1,32 @@
# Or try 'iiab-update -f' for a more rapid upgrade of IIAB Calibre-Web:
#
# https://wiki.iiab.io/go/FAQ#Can_I_upgrade_IIAB_software%3F
# https://github.com/iiab/calibre-web/wiki#upgrading
# https://github.com/iiab/iiab/blob/master/scripts/iiab-update
# https://github.com/iiab/iiab/tree/master/roles/calibre-web#upgrading
- name: Record (initial) disk space used
shell: df -B1 --output=used / | tail -1
register: df1
- name: "Install packages: imagemagick, python3-netifaces"
- name: Stop 'calibre-web' systemd service for safety (RED ERROR CAN BE IGNORED!)
systemd:
name: calibre-web
state: stopped
ignore_errors: True # Shows red errors, and continue...
#failed_when: False # Hides red errors, and continue...
# Official upstream instructions:
# apt install python3-pip python3-venv
# https://github.com/janeczku/calibre-web/wiki/Manual-installation
- name: "Install package: imagemagick"
package:
name:
- imagemagick
- python3-netifaces
#- python3-cryptography # Was needed on Raspberry Pi OS (SEE iiab/calibre-web#260, janeczku/calibre-web#3183)
#- python3-netifaces
state: present
# https://github.com/iiab/iiab/pull/3496#issuecomment-1475094542
@ -19,6 +38,13 @@
# state: present
# when: python_version is version('3.10', '>=')
- name: Does /etc/ImageMagick-6/policy.xml exist?
stat:
path: /etc/ImageMagick-6/policy.xml
register: imagemagick6_policy_xml
# 2024-12-16: Debian 13 uses /etc/ImageMagick-7/policy.xml instead, which doesn't need this lineinfile surgery:
# https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion
- name: Allow ImageMagick to read PDFs, per /etc/ImageMagick-6/policy.xml, to create book cover thumbnails
lineinfile:
path: /etc/ImageMagick-6/policy.xml
@ -26,19 +52,9 @@
backrefs: yes
line: ' <policy domain="coder" rights="read" pattern="PDF" />'
state: present
when: imagemagick6_policy_xml.stat.exists
- name: "Remove previous virtual environment {{ calibreweb_venv_path }} -- if 'calibreweb_venv_wipe: True'"
file:
path: "{{ calibreweb_venv_path }}"
state: absent
when: calibreweb_venv_wipe
- name: Does {{ calibreweb_venv_path }} exist?
stat:
path: "{{ calibreweb_venv_path }}" # /usr/local/calibre-web-py3
register: calibreweb_venv
- name: "Create 3 Calibre-Web folders to store data and config files: {{ calibreweb_home }}, {{ calibreweb_venv_path }}, {{ calibreweb_config }} (all set to {{ calibreweb_user }}:{{ apache_user }}) (default to 0755)"
- name: "Create 2 Calibre-Web folders to store data and config files: {{ calibreweb_home }}, {{ calibreweb_config }} (each set to {{ calibreweb_user }}:{{ apache_user }}, default to 0755)"
file:
state: directory
path: "{{ item }}"
@ -47,7 +63,6 @@
with_items:
- "{{ calibreweb_home }}" # /library/calibre-web
- "{{ calibreweb_config }}" # /library/calibre-web/config
- "{{ calibreweb_venv_path }}"
# FYI since May 2021, Calibre-Web (major releases) can be installed with pip:
# https://pypi.org/project/calibreweb/
@ -56,28 +71,66 @@
# https://github.com/janeczku/calibre-web/pull/927
# https://github.com/janeczku/calibre-web/pull/1459
- name: "Clone i.e. download Calibre-Web ({{ calibreweb_version }}) from {{ calibreweb_repo_url }} to {{ calibreweb_venv_path }} (~114 MB initially, ~210+ MB later) -- if {{ calibreweb_venv_path }} created just above"
- name: "Remove previous virtual environment {{ calibreweb_venv_path }} -- if 'calibreweb_venv_wipe: True'"
file:
path: "{{ calibreweb_venv_path }}" # /usr/local/calibre-web-py3
state: absent
when: calibreweb_venv_wipe
- name: Does {{ calibreweb_venv_path }} exist?
stat:
path: "{{ calibreweb_venv_path }}"
register: calibreweb_venv
- name: git clone Calibre-Web ({{ calibreweb_version }}) from {{ calibreweb_repo_url }} to {{ calibreweb_venv_path }} (~122 MB initially, ~191+ or ~203+ MB later) -- if {{ calibreweb_venv_path }} doesns't exist
git:
repo: "{{ calibreweb_repo_url }}" # e.g. https://github.com/janeczku/calibre-web
repo: "{{ calibreweb_repo_url }}" # e.g. https://github.com/iiab/calibre-web or https://github.com/janeczku/calibre-web
dest: "{{ calibreweb_venv_path }}"
force: yes
#depth: 1 # 2023-11-04: Full clone for now, to help @deldesir & wider community testing
version: "{{ calibreweb_version }}" # e.g. master, 0.6.21
#force: True # CLAIM: "If true, any modified files in the working repository will be discarded" -- REALITY: even if `force: no`, Ansible destructively reclones (also removing all test branch commits etc!) -- unless a git credential is provided to Ansible?
#depth: 1 # 2023-11-04: Full clone for now, to help @deldesir & wider community testing
version: "{{ calibreweb_version }}" # e.g. master, 0.6.22
when: not calibreweb_venv.stat.exists
- name: If Calibre-Web is being enhanced with audio/video "books" too, install/upgrade additional prereqs (CAN TAKE 3+ MINUTES, WIP)
- name: cd {{ calibreweb_venv_path }} ; git pull {{ calibreweb_repo_url }} {{ calibreweb_version }} --no-rebase --no-edit -- if {{ calibreweb_venv_path }} exists
command: git pull "{{ calibreweb_repo_url }}" "{{ calibreweb_version }}" --no-rebase --no-edit
args:
chdir: "{{ calibreweb_venv_path }}"
when: calibreweb_venv.stat.exists
- debug:
msg:
- "NEED BETTER/EXPERIMENTAL YouTube SCRAPING? RUN THE NEXT LINE -- for the latest yt-dlp 'nightly' release:"
- sudo pipx inject --pip-args='--upgrade --pre' -f library yt-dlp[default]
- name: If Calibre-Web is being enhanced with audio/video "books" too, install/upgrade additional prereqs -- SEE https://github.com/iiab/calibre-web/wiki
shell: |
if [ -f {{ calibreweb_venv_path }}/scripts/lb-wrapper ]; then
apt install ffmpeg pipx -y
if lb --version; then
pipx upgrade --include-injected xklb
if pipx list | grep -q 'xklb'; then
pipx uninstall xklb
pipx install library
else
pipx reinstall library
fi
else
pipx install xklb
ln -sf /root/.local/bin/lb /usr/local/bin/lb
ln -sf /root/.local/share/pipx/venvs/xklb/bin/yt-dlp /usr/local/bin/yt-dlp
pipx install library
fi
cp {{ calibreweb_venv_path }}/scripts/lb-wrapper {{ calibreweb_venv_path }}/scripts/lb-wrapper.greedy /usr/local/bin/
chmod a+x /usr/local/bin/lb-wrapper /usr/local/bin/lb-wrapper.greedy
ln -sf /root/.local/bin/lb /usr/local/bin/lb
if [ -f /root/.local/share/pipx/venvs/library/bin/yt-dlp ]; then
ln -sf /root/.local/share/pipx/venvs/library/bin/yt-dlp /usr/local/bin/yt-dlp
elif [ -f /root/.local/pipx/venvs/library/bin/yt-dlp ]; then
ln -sf /root/.local/pipx/venvs/library/bin/yt-dlp /usr/local/bin/yt-dlp
else
echo "ERROR: yt-dlp NOT FOUND"
fi
# NEED BETTER/EXPERIMENTAL YouTube SCRAPING? UNCOMMENT THE NEXT LINE -- for the latest yt-dlp "nightly" release:
# pipx inject --pip-args="--upgrade --pre" -f library yt-dlp[default]
#
# https://github.com/yt-dlp/yt-dlp-nightly-builds/releases
# https://pypi.org/project/yt-dlp/#history
cp {{ calibreweb_venv_path }}/scripts/lb-wrapper /usr/local/bin/
chmod a+x /usr/local/bin/lb-wrapper
fi
- name: Download Calibre-Web dependencies from 'requirements.txt' into python3 virtual environment {{ calibreweb_venv_path }}
@ -85,16 +138,19 @@
requirements: "{{ calibreweb_venv_path }}/requirements.txt"
virtualenv: "{{ calibreweb_venv_path }}" # /usr/local/calibre-web-py3
#virtualenv_site_packages: no
virtualenv_command: python3 -m venv --system-site-packages {{ calibreweb_venv_path }}
#virtualenv_command: python3 -m venv --system-site-packages {{ calibreweb_venv_path }}
virtualenv_command: python3 -m venv {{ calibreweb_venv_path }}
extra_args: --prefer-binary # 2023-10-01: Lifesaver when recent wheels (e.g. piwheels.org) are inevitably not yet built! SEE #3560
# 2023-10-11: RasPiOS Bookworm doc for Python with venv (PEP 668 now enforced!)
# https://www.raspberrypi.com/documentation/computers/os.html#python-on-raspberry-pi
# https://www.raspberrypi.com/documentation/computers/os.html#using-pip-with-virtual-environments
# https://www.raspberrypi.com/documentation/computers/os.html#use-python-on-a-raspberry-pi
# https://www.raspberrypi.com/documentation/computers/os.html#install-python-packages-using-apt
# https://www.raspberrypi.com/documentation/computers/os.html#install-python-libraries-using-pip
# VIRTUALENV EXAMPLE COMMANDS:
# python3 -m venv /usr/local/calibre-web-py3 (create venv)
# cd /usr/local/calibre-web-py3
# source bin/activate (prepends '/usr/local/calibre-web-py3/bin' to yr PATH)
# . bin/activate (or 'source bin/activate' -- this prepends '/usr/local/calibre-web-py3/bin' to yr PATH)
# python3 -m pip list ('pip list' sufficient *IF* path set above!)
# python3 -m pip freeze > /tmp/requirements.txt
# python3 -m pip install -r requirements.txt

View file

@ -58,15 +58,30 @@
AuthType Default
Require user @SYSTEM
- name: "CUPS web administration: Create Linux username 'Admin' with password 'changeme' in Linux group 'lpadmin' (shell: /usr/sbin/nologin, create_home: no)"
- name: "CUPS web administration: Create Linux username 'Admin' in Linux group 'lpadmin' (shell: /usr/sbin/nologin, create_home: no)"
user:
name: Admin
append: yes # Don't clobber other groups, that other IIAB Apps might need.
groups: lpadmin
password: "{{ 'changeme' | password_hash('sha512') }}" # Random salt. Presumably runs 5000 rounds of SHA-512 per /etc/login.defs & /etc/pam.d/common-password -- https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#encrypting-and-checksumming-strings-and-passwords
#password: "{{ 'changeme' | password_hash('sha512') }}" # Random salt. Presumably runs 5000 rounds of SHA-512 per /etc/login.defs & /etc/pam.d/common-password -- https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_filters.html#hashing-and-encrypting-strings-and-passwords
create_home: no
shell: /usr/sbin/nologin # Debian/Ubuntu norm -- instead of /sbin/nologin, /bin/false
# 2024-05-01: Above password-setting approach no longer works w/ Ansible 2.17 RC1 (#3727).
# Ansible STOPS with this error...
#
# "[DEPRECATION WARNING]: Encryption using the Python crypt module is deprecated. The Python crypt module is
# deprecated and will be removed from Python 3.13. Install the passlib library for continued encryption
# functionality. This feature will be removed in version 2.17. Deprecation warnings can be disabled by
# setting deprecation_warnings=False in ansible.cfg."
#
# ...so we instead use Linux's "chpasswd" command (below!)
- name: Use chpasswd to set Linux username 'Admin' password to 'changeme'
command: chpasswd
args:
stdin: Admin:changeme
# - name: Add user '{{ iiab_admin_user }}' to Linux group 'lpadmin' -- for CUPS web administration (or modify default 'SystemGroup lpadmin' in /etc/cups/cups-files.conf -- in coordination with ~14 -> ~15 '@SYSTEM' lines in /etc/cups/cupsd.conf)
# #command: "gpasswd -a {{ iiab_admin_user | quote }} lpadmin"
# #command: "gpasswd -d {{ iiab_admin_user | quote }} lpadmin"

View file

@ -19,7 +19,7 @@
# https://github.com/iiab/iiab/blob/master/roles/firmware/templates/iiab-check-firmware#L10-14
# https://github.com/iiab/iiab/blob/master/roles/network/templates/gateway/iiab-gen-iptables#L48-L52
# https://github.com/iiab/maps/blob/master/osm-source/pages/viewer/scripts/iiab-install-map-region#L23-L39
# https://github.com/iiab/iiab/blob/master/roles/openvpn/templates/iiab-support READS AND WRITES, INCL NON-BOOLEAN
# https://github.com/iiab/iiab/blob/master/roles/0-DEPRECATED-ROLES/openvpn/templates/iiab-support READS AND WRITES, INCL NON-BOOLEAN
iiab_var_value() {
v1=$(grep "^$1:\s" /opt/iiab/iiab/vars/default_vars.yml | tail -1 | sed "s/^$1:\s\+//; s/#.*//; s/\s*$//; s/^\(['\"]\)\(.*\)\1$/\2/")
@ -60,7 +60,7 @@ else
echo -e " cd /opt/iiab/iiab"
echo -e " sudo iiab-hotspot-off # NO LONGER NEC? eg to restore 'wifi_up_down: True'"
echo -e " sudo ./runrole --reinstall firmware"
echo -e " sudo ./iiab-network # SOMETIMES NECESSARY"
echo -e " sudo iiab-network # SOMETIMES NECESSARY"
echo -e " sudo iiab-hotspot-on # NO LONGER NEC? eg to restore 'wifi_up_down: True'"
echo -e " sudo reboot\n"
#echo

View file

@ -9,7 +9,7 @@
# Info needed to install Gitea:
gitea_version: "1.21" # 2022-01-30: Grabs latest from this MAJOR/MINOR release branch. Rather than exhaustively hard-coding point releases (e.g. 1.14.5) every few weeks. Quotes nec if trailing zero.
gitea_version: "1.22" # 2022-01-30: Grabs latest from this MAJOR/MINOR release branch. Rather than exhaustively hard-coding point releases (e.g. 1.14.5) every few weeks. Quotes nec if trailing zero.
iset_suffixes:
i386: 386
x86_64: amd64

View file

@ -36,7 +36,7 @@ Security
#. ``iiab-admin`` (specified by ``admin_console_group`` in `/opt/iiab/iiab/vars/default_vars.yml <../../vars/default_vars.yml>`_ and `/opt/iiab/iiab-admin-console/vars/default_vars.yml <https://github.com/iiab/iiab-admin-console/blob/master/vars/default_vars.yml>`_)
#. ``sudo``
* Please read much more about what escalated (root) actions are authorized when you log into IIAB's Admin Console, and how this works: https://github.com/iiab/iiab-admin-console/blob/master/Authentication.md
* If your IIAB includes OpenVPN, ``/root/.ssh/authorized_keys`` should be installed by `roles/openvpn/tasks/install.yml <../openvpn/tasks/install.yml>`_ to facilitate remote community support. Feel free to remove this as mentioned here: https://wiki.iiab.io/go/Security
* If your IIAB includes Tailscale (VPN), ``/root/.ssh/authorized_keys`` should be installed by `roles/tailscale/tasks/install.yml <../tailscale/tasks/install.yml>`_ to facilitate remote community support. Feel free to remove this as mentioned here: https://wiki.iiab.io/go/Security
* Auto-checking for the default/published password (as specified by ``iiab_admin_published_pwd`` in `/opt/iiab/iiab/vars/default_vars.yml <../../vars/default_vars.yml>`_) is implemented in `/etc/profile.d <templates/sshpwd-profile-iiab.sh>`_ (and `/etc/xdg/lxsession/LXDE-pi <templates/sshpwd-lxde-iiab.sh>`_ when it exists, i.e. on Raspberry Pi OS with desktop).
Example
@ -56,16 +56,16 @@ Historical Notes
Remote Support Tools
--------------------
The `iiab-diagnostics <../../scripts/iiab-diagnostics.README.md>`_ and `OpenVPN <https://en.wikipedia.org/wiki/OpenVPN>`_ options mentioned above can greatly help you empower your community, typically during the implementation phase of your project, even if Linux is new to you.
The `iiab-diagnostics <../../scripts/iiab-diagnostics.README.md>`_ and `Tailscale (VPN) <https://en.wikipedia.org/wiki/Tailscale>`_ options mentioned above can greatly help you empower your community, typically during the implementation phase of your project, even if Linux is new to you.
Similarly, `access.yml <tasks/access.yml>`_ adds a couple text mode tools — extremely helpful over expensive / low-bandwidth connections:
Similarly, `tasks/main.yml <tasks/main.yml>`_ adds a couple text mode tools — extremely helpful over expensive / low-bandwidth connections:
* `lynx <https://en.wikipedia.org/wiki/Lynx_(web_browser)>`_
* `screen <https://linuxize.com/post/how-to-use-linux-screen/>`_
*More great tools to help you jumpstart community action at a distance:*
* http://FAQ.IIAB.IO > "How can I remotely manage my Internet-in-a-Box?"
* `FAQ.IIAB.IO <https://wiki.iiab.io/go/FAQ>`_ > "How can I remotely manage my Internet-in-a-Box?"
Admin Console
-------------

View file

@ -8,17 +8,17 @@
dest: /etc/profile.d/iiab-pwdwarn-profile.sh
mode: '0644'
- name: Does /home/{{ iiab_admin_user }}/.config/wayfire.ini exist?
- name: Does directory /home/{{ iiab_admin_user }}/.config/labwc/ exist?
stat:
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini
register: wayfire_ini
path: /home/{{ iiab_admin_user }}/.config/labwc/
register: labwc_dir
- name: "If so, install from template: /usr/local/sbin/iiab-pwdwarn-wayfire"
- name: "If so, install from template: /usr/local/sbin/iiab-pwdwarn-labwc"
template:
src: iiab-pwdwarn-wayfire.j2
dest: /usr/local/sbin/iiab-pwdwarn-wayfire
src: iiab-pwdwarn-labwc.j2
dest: /usr/local/sbin/iiab-pwdwarn-labwc
mode: '0755'
when: wayfire_ini.stat.exists
when: labwc_dir.stat.exists and labwc_dir.stat.isdir
# 2019-03-07: This pop-up (/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh) did
# not actually appear when triggered by /etc/xdg/autostart/pprompt-iiab.desktop
@ -28,10 +28,9 @@
# https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html
# Raspbian's 2016-2018 evolution here: https://github.com/iiab/iiab/issues/1537
- name: ...and put a line in /home/{{ iiab_admin_user }}/.config/wayfire.ini to trigger iiab-pwdwarn-wayfire (& pop-up as nec)
ini_file:
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini # iiab-admin
section: autostart
option: iiab-pwdwarn-wayfire
value: /usr/local/sbin/iiab-pwdwarn-wayfire
when: wayfire_ini.stat.exists
- name: ...and put a line in /home/{{ iiab_admin_user }}/.config/labwc/autostart to trigger iiab-pwdwarn-labwc (& pop-up as nec)
lineinfile:
path: /home/{{ iiab_admin_user }}/.config/labwc/autostart # iiab-admin
create: yes
line: '/usr/local/sbin/iiab-pwdwarn-labwc &'
when: labwc_dir.stat.exists and labwc_dir.stat.isdir

View file

@ -1,6 +1,6 @@
- name: 'Install package: sudo'
package:
name: sudo # (1) Should be installed prior to installing IIAB, (2) Can also be installed by roles/1-prep's roles/openvpn/tasks/install.yml, (3) Is definitely installed by 1-prep here, (4) Used to be installed by roles/2-common/tasks/packages.yml (but that's too late!)
name: sudo # (1) Should be installed prior to installing IIAB, (2) Can be installed by 1-prep's roles/tailscale/tasks/install.yml, (3) Can be installed by 1-prep's roles/iiab-admin/tasks/sudo-prereqs.yml here, (4) Used to be installed by roles/2-common/tasks/packages.yml (but that's too late!)
- name: Temporarily make file /etc/sudoers editable (0640)
file:

View file

@ -9,10 +9,10 @@
include_role:
name: nodejs
- name: Assert that 10.x <= nodejs_version ({{ nodejs_version }}) <= 20.x
- name: Assert that 10.x <= nodejs_version ({{ nodejs_version }}) <= 22.x
assert:
that: nodejs_version is version('10.x', '>=') and nodejs_version is version('20.x', '<=')
fail_msg: "Internet Archive install cannot proceed, as it currently requires Node.js 10.x - 20.x, and your nodejs_version is set to {{ nodejs_version }}. Please check the value of nodejs_version in /opt/iiab/iiab/vars/default_vars.yml and possibly also /etc/iiab/local_vars.yml"
that: nodejs_version is version('10.x', '>=') and nodejs_version is version('22.x', '<=')
fail_msg: "Internet Archive install cannot proceed, as it currently requires Node.js 10.x - 22.x, and your nodejs_version is set to {{ nodejs_version }}. Please check the value of nodejs_version in /opt/iiab/iiab/vars/default_vars.yml and possibly also /etc/iiab/local_vars.yml"
quiet: yes
- name: "Set 'yarn_install: True' and 'yarn_enabled: True'"

View file

@ -17,11 +17,11 @@
shell: df -B1 --output=used / | tail -1
register: df1
- name: "Install package: python3-psutil"
package:
name: python3-psutil
state: present
# 2025-02-16
#- name: "Install package: python3-psutil"
# package:
# name: python3-psutil
# state: present
- name: Remove previous virtual environment {{ jupyterhub_venv }}
file:
@ -43,15 +43,16 @@
global: yes
state: latest
- name: "pip install 3 packages into virtual environment: {{ jupyterhub_venv }} (~326 MB total, after 2 Ansible calls)"
- name: "pip install 3 packages into virtual environment: {{ jupyterhub_venv }} (~316 MB total, after 2 Ansible calls)"
pip:
name:
- pip
- wheel
- jupyterhub
virtualenv: "{{ jupyterhub_venv }}" # /opt/iiab/jupyterhub
virtualenv_site_packages: no
virtualenv_command: python3 -m venv --system-site-packages "{{ jupyterhub_venv }}" # 2021-07-29: This works on RasPiOS 10, Debian 11, Ubuntu 20.04 and Mint 20 -- however if you absolutely must use the older Debian 10 -- you can work around errors "can't find Rust compiler" and "This package requires Rust >=1.41.0" if you (1) revert this line to 'virtualenv_command: virtualenv' AND (2) uncomment the line just below
#virtualenv_site_packages: no
virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" # 2025-02-16
#virtualenv_command: python3 -m venv --system-site-packages "{{ jupyterhub_venv }}" # 2021-07-29: This works on RasPiOS 10, Debian 11, Ubuntu 20.04 and Mint 20 -- however if you absolutely must use the older Debian 10 -- you can work around errors "can't find Rust compiler" and "This package requires Rust >=1.41.0" if you (1) revert this line to 'virtualenv_command: virtualenv' AND (2) uncomment the line just below
#virtualenv_python: python3 # 2021-07-29: Was needed when above line was 'virtualenv_command: virtualenv' (generally for Python 2)
extra_args: "--no-cache-dir --prefer-binary" # 2021-11-30, 2022-07-07: The "--pre" flag had earlier been needed, for beta-like pre-releases of JupyterHub 2.0.0
@ -67,8 +68,9 @@
- jupyterhub-systemdspawner
- ipywidgets
virtualenv: "{{ jupyterhub_venv }}"
virtualenv_site_packages: no
virtualenv_command: python3 -m venv --system-site-packages "{{ jupyterhub_venv }}"
#virtualenv_site_packages: no
virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" # 2025-02-16
#virtualenv_command: python3 -m venv --system-site-packages "{{ jupyterhub_venv }}"
extra_args: "--no-cache-dir --prefer-binary" # 2023-10-01: Lifesaver when recent wheels (e.g. piwheels.org) are inevitably not yet built! SEE #3560
- name: "Install from template: {{ jupyterhub_venv }}/etc/jupyterhub/jupyterhub_config.py"

View file

@ -15,32 +15,20 @@
# ignore_errors: yes
# when: is_raspbian
- name: 'Install packages: python2, python-setuptools, virtualenv (for Python 2)'
- name: 'Install packages: python2, python-setuptools, virtualenv (for Python 2) -- if Ubuntu 22.04 / Mint 21'
package:
name:
- python2
- python-setuptools # Provides setuptools-44 on recent OS's (last version compatible with python2)
- virtualenv # Drags in 'python3-virtualenv' which in turn drags in 'python3-pip' -- for Ansible module 'pip' when used with 'virtualenv_command: /usr/bin/virtualenv' and 'virtualenv_python: python2.7' -- compare package 'python3-venv' used by roles {calibre-web, jupyterhub, lokole}
state: present
when: (is_debian_11 is defined and is_debian_11) or (is_ubuntu_2204 is defined and is_ubuntu_2204) # Covers is_raspbian_11 and is_linuxmint_21, and is more future-proof than...
#when: not (is_debian_12 or is_ubuntu_2304 or is_ubuntu_2310)
# 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already.
when: is_ubuntu_2204 # Also covers is_linuxmint_21
#- name: Install Ubuntu keyrings on Debian
# get_url:
# url:
# dest: /etc/apt/keyrings/
# mode: 0644
# timeout: "{{ download_timeout }}"
# when: is_debian_12
# use key retrieval from mongodb
- name: Use scripts/install_python2.sh to install python2 and virtualenv
- name: Run scripts/install_python2.sh to install python2 and virtualenv -- if Debian 12 or RasPiOS 12
command: "{{ iiab_dir }}/scripts/install_python2.sh"
when: not ((is_debian_11 is defined and is_debian_11) or (is_ubuntu_2204 is defined and is_ubuntu_2204)) # Also avoids is_raspbian_11 and is_linuxmint_21, and is more future-proof than...
#when: is_debian_12 or is_ubuntu_2304 or is_ubuntu_2310
when: is_debian_12 # Also covers is_raspbian_12
- name: Use pip to pin setuptools to 44 in {{ kalite_venv }} # WAS: if Raspbian/Debian > 10 or Ubuntu > 19
- name: Use pip to pin setuptools to 44 in {{ kalite_venv }} -- if Ubuntu 22.04 / Mint 21, Ubuntu 23.10, Debian 12 or RasPiOS 12
pip:
name: setuptools==44
virtualenv: "{{ kalite_venv }}" # /usr/local/kalite/venv
@ -48,10 +36,9 @@
virtualenv_command: virtualenv # Traditionally /usr/bin/virtual/env -- but install_python2.sh (for Ubuntu 23.10+) sets up /usr/local/bin/virtualenv
virtualenv_python: python2.7
extra_args: "--no-use-pep517 --no-cache-dir --no-python-version-warning"
#when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19)
# long form of (is_debian_11+ or is_ubuntu_20+)
when: is_ubuntu_2204 or is_ubuntu_2310 or is_debian_12 # Also covers is_linuxmint_21 and is_raspbian_12
- name: Use pip to install ka-lite-static to {{ kalite_venv }}
- name: Use pip to install ka-lite-static to {{ kalite_venv }} -- if Ubuntu 22.04 / Mint 21, Ubuntu 23.10, Debian 12 or RasPiOS 12
pip:
name: ka-lite-static
version: "{{ kalite_version }}"
@ -60,6 +47,14 @@
virtualenv_command: virtualenv
virtualenv_python: python2.7
extra_args: "--no-cache-dir"
when: is_ubuntu_2204 or is_ubuntu_2310 or is_debian_12 # Also covers is_linuxmint_21 and is_raspbian_12
# 2024-04-30: Sadly no longer works with Ubuntu 24.04 LTS final release (#3731).
# So roles/kalite is OS-restricted during initial install, SEE: roles/7-edu-apps/tasks/main.yml
# CLARIF: If install_python2_kalite-venv_u2404.sh proves no longer useful, it will deprecated in coming months.
- name: Run scripts/install_python2_kalite-venv_u2404.sh -- if Ubuntu 24.04+ or Mint 22
command: bash "{{ iiab_dir }}/scripts/install_python2_kalite-venv_u2404.sh"
when: is_ubuntu and not is_linuxmint and os_ver is version('ubuntu-2404', '>=') or is_linuxmint_22
- name: "Install from templates: venv wrapper /usr/bin/kalite, unit file /etc/systemd/system/kalite-serve.service"
template:
@ -70,30 +65,11 @@
- { src: 'kalite.sh.j2', dest: '/usr/bin/kalite', mode: '0755' }
- { src: 'kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644' }
# Useless stanza, for 2 reasons: (1) http://box/kalite was never made to work
# (2) /etc/apache2/sites-available does not exist on many IIAB's w/o Apache
# - name: "Install from template: /etc/{{ apache_conf_dir }}/kalite.conf (useless, as http://box/kalite was never made to work)"
# template:
# src: kalite.conf
# dest: "/etc/{{ apache_conf_dir }}" # apache2/sites-available on debuntu
# when: apache_installed is defined
- name: Fix KA Lite bug in regex parsing ifconfig output (ifcfg/parser.py) for @m-anish's network names that contain dashes # WAS: if Raspbian/Debian > 10 or Ubuntu > 19
replace:
path: "{{ kalite_venv }}/lib/python2.7/site-packages/kalite/packages/dist/ifcfg/parser.py" # /usr/local/kalite/venv
regexp: 'a-zA-Z0-9'
replace: 'a-zA-Z0-9\-'
#when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19)
# 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already.
# JV: why not just is_ubuntu_20? AH: to make this work on Ubuntu 21+ and ideally Debian/RasPiOS 11+ too?
# - name: Fix KA Lite bug in regex parsing ifconfig output (ifcfg/parser.py) for @m-anish's network names that contain dashes, if Raspbian/Debian < 11 or Ubuntu < 20
# replace:
# path: "{{ kalite_venv }}/local/lib/python2.7/site-packages/kalite/packages/dist/ifcfg/parser.py"
# regexp: 'a-zA-Z0-9'
# replace: 'a-zA-Z0-9\-'
# when: is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19
# # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already.
- name: Create dir {{ kalite_root }}
file:

View file

@ -26,8 +26,12 @@
# https://github.com/iiab/iiab/issues/1675
# https://github.com/learningequality/kolibri/issues/5664
# 2022-07-30: UNCOMMENT THE FOLLOWING LINE TO TEST A PARTICULAR .deb INSTALL
# 2024-04-08: Kolibri 0.16.1+ restores install via apt
# https://github.com/learningequality/kolibri/issues/11892#issuecomment-2043073998
# 2022-07-30: UNCOMMENT ONE OF THE FOLLOWING LINES TO TEST A PARTICULAR .deb INSTALL
# kolibri_deb_url: https://learningequality.org/r/kolibri-deb-latest
# 2024-02-17: https://github.com/learningequality/kolibri/issues/11892
# kolibri_deb_url: https://learningequality.org/r/kolibri-deb-next
# 2019-11-21 issue #2045 - above URL had redirected to this broken Kolibri 0.12.9 release:
# https://storage.googleapis.com/le-releases/downloads/kolibri/v0.12.9/kolibri_0.12.9-0ubuntu1_all.deb
#

View file

@ -76,17 +76,20 @@
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys DC5BAA93F9E4AE4F0411F97C74F88ADB3194DD81
gpg --yes --output /usr/share/keyrings/learningequality-kolibri.gpg --export DC5BAA93F9E4AE4F0411F97C74F88ADB3194DD81
- name: Add signed Kolibri PPA 'jammy' (if Ubuntu 22.04+ or Mint 21 or Debian 12)
# 2024-06-25: Strongly consider PPA "kolibri-proposed" in future...
# https://github.com/learningequality/kolibri/issues/11892
# https://kolibri.readthedocs.io/en/latest/install/ubuntu-debian.html
- name: Add signed Kolibri PPA 'jammy'
apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/learningequality-kolibri.gpg] http://ppa.launchpad.net/learningequality/kolibri/ubuntu jammy main"
when: is_ubuntu and os_ver is version('ubuntu-2204', '>=') or is_linuxmint_21 or is_debian_12
#when: is_ubuntu_2204 or is_ubuntu_2210 or is_debian_12 # MINT 21 COVERED BY is_ubuntu_2204
# when: is_ubuntu and os_ver is version('ubuntu-2204', '>=') or is_linuxmint_21 or is_debian_12
# #when: is_ubuntu_2204 or is_ubuntu_2210 or is_debian_12 # MINT 21 COVERED BY is_ubuntu_2204
- name: Add signed Kolibri PPA 'focal' (if other/older OS's)
apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/learningequality-kolibri.gpg] http://ppa.launchpad.net/learningequality/kolibri/ubuntu focal main"
when: not (is_ubuntu and os_ver is version('ubuntu-2204', '>=') or is_linuxmint_21 or is_debian_12)
#when: not (is_ubuntu_2204 or is_ubuntu_2210 or is_debian_12)
# - name: Add signed Kolibri PPA 'focal' (if other/older OS's)
# apt_repository:
# repo: "deb [signed-by=/usr/share/keyrings/learningequality-kolibri.gpg] http://ppa.launchpad.net/learningequality/kolibri/ubuntu focal main"
# when: not (is_ubuntu and os_ver is version('ubuntu-2204', '>=') or is_linuxmint_21 or is_debian_12)
# #when: not (is_ubuntu_2204 or is_ubuntu_2210 or is_debian_12)
# - name: Add Kolibri PPA repo 'ppa:learningequality/kolibri' (if is_ubuntu and not is_linuxmint)
# apt_repository:
@ -121,6 +124,15 @@
# codename: focal # UPDATE THIS TO 'jammy' AFTER "RasPiOS Bookworm" (based on Debian 12) IS RELEASED! (ETA Q3 2023)
# when: is_debian or is_linuxmint_20
# 2024-08-07: Hack no longer needed! As Kolibri 0.17.0 now installs via "kolibri" PPA (https://launchpad.net/~learningequality/+archive/ubuntu/kolibri).
# Hopefully "kolibri-proposed" PPA will install 0.18 pre-releases soon, on Python 3.13 too! https://github.com/learningequality/kolibri/issues/11892
# - name: '2024-06-25 TEMPORARY HACK: Hard code kolibri_deb_url to Kolibri 0.17.x (pre-release or final release) if Python >= 3.12 -- kolibri-proposed PPA should do this automatically in future!'
# set_fact:
# kolibri_deb_url: https://github.com/learningequality/kolibri/releases/download/v0.17.0/kolibri_0.17.0-0ubuntu1_all.deb
# when: python_version is version('3.12', '>=') # For Ubuntu 24.04, Mint 22, pre-releases of Ubuntu 24.10, and Debian 13 (even if/when "Trixie" changes from Python 3.12 to 3.13!) Regarding PPA kolibri-proposed not quite being ready yet, see: learningequality/kolibri#11316 -> learningequality/kolibri#11892
- name: apt install kolibri (using apt source specified above, if kolibri_deb_url ISN'T defined)
apt:
name: kolibri

View file

@ -4,7 +4,7 @@
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
mediawiki_major_version: "1.41" # "1.40" quotes nec if trailing zero
mediawiki_major_version: "1.43" # "1.40" quotes nec if trailing zero
mediawiki_minor_version: 0
mediawiki_version: "{{ mediawiki_major_version }}.{{ mediawiki_minor_version }}"

View file

@ -8,11 +8,11 @@
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
# 2023-04-25: Currently testing Moodle's master branch is mandatory if your
# OS PHP >= 8.3, see moodle/tasks/install.yml for detail! OR, *IF* your
# OS PHP < 8.3, then {{ moodle_version }} will be attempted:
moodle_version: MOODLE_403_STABLE # Moodle 4.3
#moodle_version: master # e.g. to try Moodle's "weekly" 4.2dev pre-release *EVEN IF* OS PHP < 8.2
# October 2024: Currently testing Moodle's main branch is mandatory if your
# OS PHP >= 8.4, see moodle/tasks/install.yml for detail! OR, *IF* your
# OS PHP < 8.4, then {{ moodle_version }} will be attempted:
moodle_version: MOODLE_405_STABLE # Moodle 4.5
#moodle_version: main # e.g. to try Moodle's "weekly" 5.0dev pre-release *EVEN IF* OS PHP < 8.4
moodle_repo_url: https://github.com/moodle/moodle
#moodle_repo_url: git://git.moodle.org/moodle.git # 2020-10-16: VERY Slow!

View file

@ -96,21 +96,21 @@
moodle_version: MOODLE_401_STABLE # i.e. Moodle 4.1 LTS
when: php_version is version('8.0', '<') or not dpkg_arch.stdout is search("64")
- name: Download (clone) {{ moodle_repo_url }} branch '{{ moodle_version }}' to {{ moodle_base }} (~403 MB initially, ~431 MB later) if OS PHP {{ php_version }} < 8.3
- name: Download (clone) {{ moodle_repo_url }} branch '{{ moodle_version }}' to {{ moodle_base }} (~476 MB initially, ~504 MB later) if OS PHP {{ php_version }} < 8.4
git:
repo: "{{ moodle_repo_url }}" # https://github.com/moodle/moodle
dest: "{{ moodle_base }}" # /opt/iiab/moodle
depth: 1
version: "{{ moodle_version }}" # e.g. MOODLE_403_STABLE (Moodle 4.3)
when: php_version is version('8.3', '<')
version: "{{ moodle_version }}" # e.g. MOODLE_404_STABLE (Moodle 4.4)
when: php_version is version('8.4', '<')
- name: "MOODLE PRE-RELEASE TESTING: Download (clone) {{ moodle_repo_url }} branch 'master' to {{ moodle_base }} (~403 MB initially, ~431 MB later) if OS PHP {{ php_version }} >= 8.3"
- name: "MOODLE PRE-RELEASE TESTING: Download (clone) {{ moodle_repo_url }} branch 'main' to {{ moodle_base }} (~476 MB initially, ~504 MB later) if OS PHP {{ php_version }} >= 8.4"
git:
repo: "{{ moodle_repo_url }}"
dest: "{{ moodle_base }}"
depth: 1
version: master # For "weekly" Moodle pre-releases: https://download.moodle.org/releases/development/ (e.g. 3.5beta+ in May 2018, 4.1dev in Sept 2022, 4.2dev in Dec 2022, 4.3dev in May 2023, 4.4dev in Oct 2023)
when: php_version is version('8.3', '>=')
version: main # For "weekly" Moodle pre-releases: https://download.moodle.org/releases/development/ (e.g. 3.5beta+ in May 2018, 4.1dev in Sept 2022, 4.2dev in Dec 2022, 4.3dev in May 2023, 4.4dev in Oct 2023, 4.5dev in Apr 2024, 5.0dev in Oct 2024)
when: php_version is version('8.4', '>=')
- name: chown -R {{ apache_user }}:{{ apache_user }} {{ moodle_base }} (by default dirs 755 & files 644)
file:

View file

@ -9,7 +9,7 @@
name: net.ipv6.conf.all.disable_ipv6
value: 0
- name: "Install 5 packages: libcgi-fast-perl, munin, munin-node, munin-plugins-extra, python3-passlib"
- name: "Install 4 packages: libcgi-fast-perl, munin, munin-node, munin-plugins-extra"
package:
name:
#- libapache2-mod-fcgid
@ -17,9 +17,15 @@
- munin
- munin-node
- munin-plugins-extra
- python3-passlib # For Ansible module 'htpasswd' in Ansible collection community.general -- used just below
#- python3-passlib # For Ansible module 'htpasswd' in Ansible collection community.general -- used just below
state: present
- name: pip install 'passlib' into venv /usr/local/ansible -- for Ansible module 'htpasswd' in Ansible collection community.general -- used just below
pip:
name: passlib
virtualenv: /usr/local/ansible
extra_args: "--upgrade --no-cache-dir --prefer-binary" # 2023-10-01: Lifesaver when recent wheels (e.g. piwheels.org) are inevitably not yet built! SEE #3560
# SEE ALSO roles/network/tasks/install.yml
- name: RESTORE net.ipv6.conf.all.disable_ipv6 to 1 in /etc/sysctl.conf for #3434
sysctl:

View file

@ -3,16 +3,22 @@
register: df1
- name: 'Install MySQL packages: mariadb-server, mariadb-client, php{{ php_version }}-mysql, python3-pymysql'
- name: 'Install MySQL packages: mariadb-server, mariadb-client, php{{ php_version }}-mysql'
package:
name:
- mariadb-server
- mariadb-client
#- php{{ php_version }}-common # Auto-installed as an apt dependency. REGARDLESS: php{{ php_version }}-common superset php{{ php_version }}-cli is auto-installed by php{{ php_version }}-fpm in nginx/tasks/install.yml
- php{{ php_version }}-mysql # Likewise installed in nextcloud/tasks/install.yml, pbx/tasks/freepbx.yml, wordpress/tasks/install.yml
- python3-pymysql # For Ansible modules {mysql_db, mysql_user} in Ansible collection community.mysql -- used in MySQL roles {mediawiki, nextcloud, wordpress} and possibly {elgg, pbx}
#- python3-pymysql # For Ansible modules {mysql_db, mysql_user} in Ansible collection community.mysql -- used in MySQL roles {mediawiki, nextcloud, wordpress} and possibly {elgg, pbx}
state: present
- name: pip install 'PyMySQL' into venv /usr/local/ansible -- for Ansible modules {mysql_db, mysql_user} in Ansible collection community.mysql -- used in roles {mediawiki, nextcloud, wordpress, matomo, pbx}
pip:
name: PyMySQL
virtualenv: /usr/local/ansible
extra_args: "--upgrade --no-cache-dir --prefer-binary" # 2023-10-01: Lifesaver when recent wheels (e.g. piwheels.org) are inevitably not yet built! SEE #3560
# 2020-07-11: 10 PHP package installs moved to roles/www_base/tasks/main.yml
# php{{ php_version }}-sqlite3 install moved to roles/osm-vector-maps/tasks/install.yml

View file

@ -55,7 +55,7 @@ strict_networking: False
iiab_demo_mode: False
gui_static_wan: False
wan_cidr: ""
virtual_network_devices: "-e wwlan -e ppp -e ap0 -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth"
virtual_network_devices: "-e wwlan -e ppp -e ap0 -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth -e tailscale0"
# Set defaults for discovery process as strings
wifi1: "not found-1"
@ -71,6 +71,8 @@ iiab_lan_iface: none
discovered_lan_iface: none
discovered_wired_iface: none
discovered_wireless_iface: none
# use the same case as what `iw reg get` would return with 00 present
host_country_code_found: UNSET
# Red Hat
#iiab_wired_lan_iface: "none"

View file

@ -78,7 +78,7 @@
- name: Reload systemd
systemd:
daemon_reload: yes
when: not iiab_lan_iface == "br0"
when: not no_net_restart or not iiab_lan_iface == "br0"
- name: Restart the NetworkManager service
systemd:

View file

@ -239,6 +239,41 @@
iiab_lan_iface: "{{ iiab_wireless_lan_iface }}"
when: iiab_wireless_lan_iface is defined and nobridge is defined
- name: Detect WiFi country code in use
shell: iw reg get | grep country | grep -v UNSET | awk '{print $2}' | sed "s|:||"
register: REG_DOM
ignore_errors: True
- name: Set host_country_code_found
set_fact:
host_country_code_found: "{{ REG_DOM.stdout }}"
when: REG_DOM.stdout is defined and REG_DOM.stdout | length > 0
- name: Set Wifi Region country to {{ REG_DOM.stdout }} for hostapd when present
set_fact:
host_country_code: "{{ REG_DOM.stdout }}"
when: REG_DOM.stdout is defined and REG_DOM.stdout | length > 0 and wifi_up_down and can_be_ap and has_wifi_gateway is defined
- name: Detect current Wifi channel
shell: iw {{ discovered_wireless_iface }} info | grep channel | cut -d' ' -f2
register: current_client_channel
when: wifi_up_down and can_be_ap and has_wifi_gateway is defined
- name: Forcing wifi_up_down to False based on firmware selection "24"
set_fact:
wifi_up_down: False
when: rpi3bplus_rpi4_wifi_firmware == "24"
- name: Detect "Firmware rejected country setting" in dmesg (invert return code, for intentional red error)
shell: '! dmesg | grep ieee80211 | grep "Firmware rejected country setting"'
register: FW_rejected_country
ignore_errors: True
- name: Detect country code passed from cmdline in dmesg
shell: dmesg | grep -om1 'cfg80211\.ieee80211_regdom=\S*' | cut -d= -f2
register: cmdline_country_code
ignore_errors: True
- name: In VM disable LAN - needs local_vars entry to activate
set_fact:
iiab_lan_iface: none
@ -295,6 +330,36 @@
value: "{{ iiab_wan_iface }}"
- option: can_be_ap
value: "{{ can_be_ap }}"
- option: host_country_code_found
value: "{{ host_country_code_found }}"
- option: wifi_firmware_43430
value: "{{ rpizerow_rpi3_wifi_firmware }}"
- option: wifi_firmware_43455
value: "{{ rpi3bplus_rpi4_wifi_firmware }}"
- name: Add 'detected_network' variable 'current_client_channel_found' stdout value ({{ current_client_channel.stdout }}) if defined and non-empty, to {{ iiab_ini_file }}
ini_file:
dest: "{{ iiab_ini_file }}"
section: detected_network
option: client_wifi_channel_found
value: "{{ current_client_channel.stdout }}"
when: current_client_channel.stdout is defined and current_client_channel.stdout != ""
- name: Add 'detected_network' variable 'FW_rejected_country' stdout value ({{ FW_rejected_country.stdout }}) if defined and non-empty, to {{ iiab_ini_file }}
ini_file:
dest: "{{ iiab_ini_file }}"
section: detected_network
option: FW_rejected_country
value: "{{ FW_rejected_country.stdout }}"
when: FW_rejected_country.stdout is defined and FW_rejected_country.stdout != ""
- name: Add 'detected_network' variable 'cmdline_country_code' stdout value ({{ cmdline_country_code.stdout }}) if defined and non-empty, to {{ iiab_ini_file }}
ini_file:
dest: "{{ iiab_ini_file }}"
section: detected_network
option: cmdline_country_code
value: "{{ cmdline_country_code.stdout }}"
when: cmdline_country_code.stdout is defined and cmdline_country_code.stdout != ""
# well if there ever was a point to tell the user things are FUBAR this is it.
# limit 2 network adapters wifi wired

View file

@ -3,28 +3,12 @@
hostapd_enabled: False
when: (not wifi_up_down and discovered_wireless_iface == iiab_wan_iface) or discovered_wireless_iface == "none" or not can_be_ap
- name: Disable the Access Point 'hostapd' service
- name: Disable the Access Point 'hostapd' service if hostapd_enabled False
systemd:
name: hostapd
enabled: no
when: not hostapd_enabled
- name: Detect WiFi country code in use
shell: iw reg get | grep country | grep -v UNSET | awk '{print $2}' | sed "s|:||"
register: REG_DOM
ignore_errors: True
when: wifi_up_down and can_be_ap and has_wifi_gateway is defined
- name: Set Wifi Region country code for hostapd when present
set_fact:
host_country_code: "{{ REG_DOM.stdout }}"
when: REG_DOM.stdout is defined and REG_DOM.stdout | length > 0
- name: Detect current Wifi channel
shell: iw {{ discovered_wireless_iface }} info | grep channel | cut -d' ' -f2
register: current_client_channel
when: wifi_up_down and can_be_ap and has_wifi_gateway is defined
- name: Setting WiFi channel to {{ current_client_channel.stdout }}
set_fact:
host_channel: "{{ current_client_channel.stdout }}"
@ -131,14 +115,3 @@
value: "{{ host_country_code }}"
- option: host_channel
value: "{{ host_channel }}"
- name: Add 'network' variable 'current_client_channel' value if defined, to {{ iiab_ini_file }}
ini_file:
dest: "{{ iiab_ini_file }}"
section: network
option: "{{ item.option }}"
value: "{{ item.value | string }}"
with_items:
- option: client_wifi_channel
value: "{{ current_client_channel.stdout }}"
when: current_client_channel.stdout is defined

View file

@ -18,7 +18,7 @@
# total download size) and they can help IIAB field operators with BOTH
# (1) internal WiFi AND (2) USB WiFi devices inserted anytime/later.
- name: 'Install 12 network packages: avahi-daemon, hostapd, iproute2, iptables-persistent, iw, libnss-mdns, netmask, net-tools, networkd-dispatcher, rfkill, wireless-tools, wpasupplicant -- later used by https://github.com/iiab/iiab/tree/master/roles/network'
- name: 'Install 11 network packages: avahi-daemon, hostapd, iproute2, iptables-persistent, iw, libnss-mdns, netmask, net-tools, networkd-dispatcher, rfkill, wpasupplicant -- later used by https://github.com/iiab/iiab/tree/master/roles/network'
package:
name:
- avahi-daemon # 97kB download: RasPiOS (and package libnss-mnds, below) install this regardless -- holdover from the XO days and used to advertise ssh/admin-console being available via avahi-daemon -- used with https://github.com/iiab/iiab/blob/master/roles/network/tasks/avahi.yml
@ -32,10 +32,18 @@
- netmask # 25kB download: Handy utility -- helps determine network masks
- net-tools # 248kB download: RasPiOS installs this regardless -- @jvonau suggests possibly deleting this...unless oldtimers really want these older commands in iiab-diagnostics output?
- rfkill # 87kB download: RasPiOS installs this regardless -- enable & disable wireless devices
- wireless-tools # 112kB download: RasPiOS installs this regardless -- manipulate Linux Wireless Extensions
- wpasupplicant # 1188kB download: RasPiOS installs this regardless -- client library for connections to a WiFi AP
state: present
# 2024-10-02: Legacy apt package 'wireless-tools' no longer offered by Ubuntu
# 24.10+ (#3805) but FYI: https://en.wikipedia.org/wiki/Wireless_tools_for_Linux
- name: "Install legacy apt package wireless-tools, if OS still supports it -- or intentionally show (HARMLESS!) red error -- helping to monitor Linux's evolution"
package:
name: wireless-tools # 112kB download: RasPiOS installs this regardless -- manipulate Linux Wireless Extensions
state: present
ignore_errors: True # Intentionally show red error, and continue.
#failed_when: False # Hides red errors (stronger than 'ignore_errors: yes')
# 2021-08-17: Debian ignores this, according to 2013 post:
# https://serverfault.com/questions/511099/debian-ignores-etc-network-if-pre-up-d-iptables
# - name: Install /etc/network/if-pre-up.d/iptables from template (0755)

View file

@ -1,8 +1,3 @@
- name: Select RPi firmware mode
include_role:
name: firmware
when: rpi_model != "none"
- name: detected_network
include_tasks: detected_network.yml
@ -68,6 +63,13 @@
#### End services
#### Start network layout
# 2024-12-18: As `rfkill unblock wifi` formerly in rpi_debian.yml wasn't enough, especially with NM (NetworkManager)
- name: Run 'raspi-config nonint do_wifi_country {{ host_country_code }}' (using var host_country_code) to unblock WiFi, if RasPiOS
command: raspi-config nonint do_wifi_country {{ host_country_code }}
when: is_raspbian
#ignore_errors: True
#- name: Redhat networking
# include_tasks: ifcfg_mods.yml
# when: is_redhat
@ -101,6 +103,11 @@
# end block
when: network_installed is defined and network_enabled
- name: Select RPi firmware mode
include_role:
name: firmware
when: rpi_model != "none"
- name: Create {{ iiab_etc_path }}/install-flags/iiab-network-complete on second pass of network role.
file:

View file

@ -5,18 +5,17 @@
# shell / ssh logins (across all OS's/distros/window managers) might also make sense?
- name: Does /home/{{ iiab_admin_user }}/.config/wayfire.ini exist?
- name: Does directory /home/{{ iiab_admin_user }}/.config/labwc/ exist?
stat:
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini
register: wayfire_ini
path: /home/{{ iiab_admin_user }}/.config/labwc/
register: labwc_dir
- name: If so, add /usr/local/sbin/iiab-netwarn to /home/{{ iiab_admin_user }}/.config/wayfire.ini
ini_file:
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini # iiab-admin
section: autostart
option: iiab-netwarn
value: /usr/local/sbin/iiab-netwarn
when: wayfire_ini.stat.exists
- name: If so, add '/usr/local/sbin/iiab-netwarn &' to /home/{{ iiab_admin_user }}/.config/labwc/autostart
lineinfile:
path: /home/{{ iiab_admin_user }}/.config/labwc/autostart # iiab-admin
create: yes
line: '/usr/local/sbin/iiab-netwarn &'
when: labwc_dir.stat.exists and labwc_dir.stat.isdir
# mate desktop detection based on 'register: nd_dir' in enable_services
@ -45,4 +44,4 @@
src: roles/network/templates/netwarn/iiab-netwarn # Invoked by 1-prep (so full path needed)
dest: /usr/local/sbin/
mode: 0755
when: wayfire_ini.stat.exists or (mate_dir.stat.exists and mate_dir.stat.isdir)
when: (labwc_dir.stat.exists and labwc_dir.stat.isdir) or (mate_dir.stat.exists and mate_dir.stat.isdir)

View file

@ -12,7 +12,7 @@
state: restarted
with_items:
- wpa_supplicant
when: wifi_up_down and hostapd_enabled
when: wifi_up_down and hostapd_enabled and not network_manager_active
- name: Enable & Restart networkd-dispatcher.service
systemd:
@ -28,12 +28,16 @@
state: restarted
when: wifi_up_down and can_be_ap and ansible_ap0 is undefined
- name: Restart hostapd when WiFi is present but not when using WiFi as gateway with wifi_up_down False
- name: Waiting {{ hostapd_wait }} seconds for network to stabilize for ap0
shell: sleep {{ hostapd_wait }}
when: ansible_ap0 is undefined
- name: Restart hostapd when WiFi is present but not when using WiFi as gateway
systemd:
name: hostapd
state: restarted
daemon_reload: yes
when: hostapd_enabled and (wifi_up_down or not no_net_restart)
when: hostapd_enabled and not no_net_restart
# 2022-07-22: @jvonau suggests commenting this out as: "we really don't touch
# any of the config files... netplan.yml renames one file if it's a container
@ -107,7 +111,7 @@
systemd:
name: hostapd
state: restarted
when: hostapd_enabled and wifi_slave.stdout is defined and wifi_slave.stdout == 0
when: hostapd_enabled and not no_net_restart and wifi_slave.stdout is defined and wifi_slave.stdout == 0
#both interfaces.d and systemd-networkd should have br0 available and Appliance lacks br0
#keep an eye on legacy wifi installs where br0 is present but not 'online' with an ip address

View file

@ -53,10 +53,11 @@
line: country={{ host_country_code }}
when: country_code.stdout is defined and country_code.stdout | length == 0
# This should go away, should only be unblocked by raspi-config
- name: Enable the WiFi with rfkill
shell: rfkill unblock 0
ignore_errors: True
# 2024-12-18: SEE 'raspi-config nonint do_wifi_country {{ host_country_code }}' in roles/network/tasks/main.yml
# # This should go away, should only be unblocked by raspi-config
# - name: Enable the WiFi with rfkill
# shell: rfkill unblock wifi
# ignore_errors: True
- name: Copy the bridge script for RPi
template:

View file

@ -39,7 +39,7 @@ IPTABLES_DATA=/etc/sysconfig/iptables
# https://github.com/iiab/iiab/blob/master/roles/firmware/templates/iiab-check-firmware#L10-14
# https://github.com/iiab/iiab/blob/master/roles/network/templates/gateway/iiab-gen-iptables#L48-L52
# https://github.com/iiab/maps/blob/master/osm-source/pages/viewer/scripts/iiab-install-map-region#L23-L39
# https://github.com/iiab/iiab/blob/master/roles/openvpn/templates/iiab-support READS AND WRITES, INCL NON-BOOLEAN
# https://github.com/iiab/iiab/blob/master/roles/0-DEPRECATED-ROLES/openvpn/templates/iiab-support READS AND WRITES, INCL NON-BOOLEAN
# "awk '{print $2}'" almost works, but: (1) Fails to remove outer quotes, and
# (2) Chops up Ansible vars containing multiple words w/o surrounding quotes.

View file

@ -14,7 +14,7 @@ echo " IIAB hotspot access point Disabled"
#exit 0
{% else %}
echo " IIAB hotspot access point Disabled"
{% if is_raspbian %}
{% if dhcpcd_result == "enabled" %}
# hotspot-off before ap0_updown
sed -i "s/^denyinterfaces/#denyinterfaces/" /etc/dhcpcd.conf
#systemctl disable dnsmasq
@ -37,7 +37,7 @@ fi
echo -e "\nIf you're enabling upstream WiFi, please reboot now.\n"
#exit 0
{% endif %}
#is_raspbian
#if dhcpcd_result == "enabled"
{% endif %}
#wifi_up_down
{% endif %}

View file

@ -16,7 +16,7 @@ systemctl enable hostapd
systemctl enable iiab-wifi-test.service
#exit 0
{% else %}
{% if is_raspbian %}
{% if dhcpcd_result == "enabled" %}
# just do what we have always done in hotspot-on
cp -f /etc/hostapd/hostapd.conf.iiab /etc/hostapd/hostapd.conf
sed -i "s/^#denyinterfaces/denyinterfaces/" /etc/dhcpcd.conf
@ -44,7 +44,7 @@ fi
systemctl enable hostapd
#exit 0
{% endif %}
#is_raspbian
#if dhcpcd_result == "enabled"
{% endif %}
#wifi_up_down
{% endif %}

View file

@ -3,7 +3,10 @@
# CONFUSING BUT FYI: Steps below run *strictly sequentially* when this script
# (/usr/local/sbin/iiab-netwarn) is run on boot, triggered by either autostart:
# https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html
# ...or by Wayland compositor Wayfire's ~/.config/wayfire.ini for RasPiOS 12+:
# ...or by Wayland compositor's ~/.config/labwc/autostart in new RasPiOS 12+:
# https://forums.raspberrypi.com/viewtopic.php?t=379321
# (Prior to Dec 2024, RasPiOS compositor Wayfire did the same...)
# https://github.com/iiab/iiab/pull/3685
# https://github.com/WayfireWM/wayfire/wiki/Configuration#autostart
#
# This allows return codes ($rc) to be meaningful, at each successive step.

View file

@ -42,7 +42,7 @@ Useful PHP recommendations for these settings (while largely tailored to WordPre
- https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html
- https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
- https://docs.nextcloud.com/server/27/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
- https://docs.nextcloud.com/server/30/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
- https://github.com/iiab/iiab/blob/master/roles/nextcloud/tasks/install.yml
## Using It

View file

@ -131,7 +131,7 @@
# nextcloud_dl_url: https://download.nextcloud.com/server/releases/latest-25.tar.bz2
# when: php_version is version('8.0', '<')
- name: Unarchive {{ nextcloud_dl_url }} (~176 MB) to {{ nextcloud_root_dir }} (~616 MB initially, sometimes ~655 MB later, {{ apache_user }}:{{ apache_user }})
- name: Unarchive {{ nextcloud_dl_url }} (~216 MB) to {{ nextcloud_root_dir }} (~844 MB initially, sometimes ~878 MB later, {{ apache_user }}:{{ apache_user }})
unarchive:
remote_src: yes # Overwrite even if "already exists on the target"
src: "{{ nextcloud_dl_url }}"

View file

@ -52,11 +52,11 @@
* kalite (menu goes directly to ports 8006-8008)
* minetest
* mosquitto
* openvpn
* pbx [FreePBX is usable with _both_ NGINX and Apache as of 2021-08-18, thanks to PR [#2954](https://github.com/iiab/iiab/pull/2954)]
* phpmyadmin [*, requires Apache for now, as in Section iii.]
* samba [*, [PR #2923](https://github.com/iiab/iiab/pull/2923)]
* sshd
* tailscale
* transmission
* vnstat

View file

@ -5,10 +5,25 @@ location / {
location /usb {
alias /library/www/html/local_content/;
fancyindex on; # autoindex on;
add_before_body /upload2usb/button.html;
}
location ~ ^/upload2usb/(.*)\.php$ {
alias /library/www/html/upload2usb/$1.php;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
fastcgi_pass php;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include fastcgi_params;
}
location /local_content/ {
fancyindex on; # autoindex on;
add_before_body /upload2usb/button.html;
}
location /info {

View file

@ -4,9 +4,11 @@
https://internet-in-a-box.org[Internet-in-a-Box (IIAB)] can install https://asterisk.org/[Asterisk] and https://freepbx.org/[FreePBX] for Voice over IP (VoIP) calls using regular Android and iPhone softphone (SIP) apps — e.g. for low-cost and rural telephony.
As of December 2023, IIAB installs https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Documentation[Asterisk 20] and https://www.freepbx.org/freepbx-16-is-now-released-for-general-availability/[FreePBX 16].
As of December 2024, IIAB supports https://www.asterisk.org/asterisk-news/asterisk-22-0-0-now-available/[Asterisk 22] and https://sangomakb.atlassian.net/wiki/spaces/FP/pages/222101505/FreePBX+17[FreePBX 17] (https://www.freepbx.org/freepbx-17-is-now-ga/[announcement]). A https://github.com/iiab/iiab/wiki/IIAB-Platforms#operating-systems[modern OS with PHP 8.x] is required (https://github.com/iiab/iiab/pull/3675[PR #3675]).
*PHP 7.4 is unfortunately REQUIRED (https://github.com/iiab/iiab/pull/2899[PR #2899]) and PHP 8.x does not yet work (https://github.com/iiab/iiab/issues/3556[#3556]) &mdash; sadly this remains true in December 2023, and will likely remain true until https://github.com/FreePBX/framework/tree/release/17.0[FreePBX 17] is eventually released &mdash; so please consider installing on https://github.com/iiab/iiab/wiki/IIAB-Platforms#operating-systems[Debian 11 "Bullseye", or 64-bit Raspberry Pi OS versions based on "Bullseye"] (https://github.com/iiab/iiab/pull/3523[PR #3523]).*
////
*PHP 7.4 is unfortunately REQUIRED (https://github.com/iiab/iiab/pull/2899[PR #2899]) and PHP 8.x does not yet work (https://github.com/iiab/iiab/issues/3556[#3556], https://github.com/iiab/iiab/pull/3675[#3675]) &mdash; sadly this remains true as of 2024-01-13 with https://www.freepbx.org/freepbx-17-beta-release-and-debian-future/[FreePBX 17 BETA], and may remain true until https://github.com/FreePBX/framework/tree/release/17.0[FreePBX 17] is eventually released &mdash; so if you really must try to force an install onto dangerously EOL'd (end-of-life as of November 2022) PHP 7.4, consider an older OS like https://github.com/iiab/iiab/wiki/IIAB-Platforms#operating-systems[Ubuntu 20.04, Debian 11 "Bullseye", or 64-bit Raspberry Pi OS versions based on "Bullseye"] (https://github.com/iiab/iiab/pull/3523[PR #3523]). RECAP: IIAB does _NOT_ support such dangerous/older OS's!*
////
////
As of August 2021, IIAB installs https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Documentation[Asterisk 18] and https://www.freepbx.org/freepbx-16-beta-is-here/[FreePBX 16 Beta], as required by the latest PHP 7.4 Linux OS's (https://github.com/iiab/iiab/pull/2899[PR #2899]). Please consider installing this on https://github.com/iiab/iiab/wiki/IIAB-Platforms#operating-systems[Ubuntu 20.04+, Debian 11 — or the imminent Raspberry Pi OS 11 "Bullseye"].
@ -355,4 +357,10 @@ In May 2022, installation of FreePBX was made more resilient in https://github.c
* Ron Raikes' routine to install FreePBX from GitHub: https://community.freepbx.org/t/asterisk-19-1-0-and-freepbx-install/81029/15
In 2024, see also the official:
* https://sangomakb.atlassian.net/wiki/spaces/FP/pages/222101505/FreePBX+17[FreePBX 17] Installation Script (for Debian 12): https://github.com/FreePBX/sng_freepbx_debian_install
* FreePBX 17 Installation: https://sangomakb.atlassian.net/wiki/spaces/FP/pages/230326391/FreePBX+17+Installation
* Step By Step Debian 12 Installation: https://sangomakb.atlassian.net/wiki/spaces/FP/pages/295403538/Step+By+Step+Debian+12+Installation
Thank you to _ALL_ who've contributed — including Lemuel D'Souza, Jerry Vonau, Adam Holt and Anish Mangal!

View file

@ -26,13 +26,13 @@
asterisk_url: https://downloads.asterisk.org/pub/telephony/asterisk
asterisk_src_file: asterisk-20-current.tar.gz
asterisk_src_file: asterisk-22-current.tar.gz
asterisk_src_dir: "{{ iiab_base }}/asterisk" # /opt/iiab
# freepbx_url: https://mirror.freepbx.org/modules/packages/freepbx/7.4
# freepbx_src_file: freepbx-16.0-latest.tgz # 2022-05-25 #3228: Filename has become bogus (as it's not really the latest!) Manually unpacking the latest .tar.gz for FreePBX 16.x from https://github.com/FreePBX/framework/tags to /opt/iiab/freepbx can work if absolutely nec.
freepbx_git_url: https://github.com/FreePBX/framework
freepbx_git_branch: release/16.0 # EMERGING OPTION AS OF MAY 2022: https://github.com/FreePBX/framework/tree/release/17.0
freepbx_git_branch: release/17.0 # STILL IN FLUX AS OF FEB 2024: https://github.com/FreePBX/framework/tree/release/17.0
freepbx_src_dir: "{{ iiab_base }}/freepbx"
freepbx_install_dir: /var/www/html/freepbx

View file

@ -256,19 +256,22 @@
args:
chdir: "{{ freepbx_src_dir }}"
#creates: "{{ freepbx_install_dir }}" # /var/www/html/freepbx
ignore_errors: yes # 2024-02-25: UGLY / TEMPORARY WORKAROUND #1 OF 2, to bypass "You have successfully installed FreePBX" w/ exit code 1 -- https://github.com/iiab/iiab/pull/3675#issuecomment-1890590227
# 2022-05-25 BACKGROUND: https://github.com/iiab/iiab/pull/3229#issuecomment-1138061460
- name: FreePBX - Revert the above just-installed FreePBX 'framework' module by a few weeks-or-so from GitHub's bleeding edge, to a more official version (which can help to install the ~15 modules below!)
command: fwconsole ma downloadinstall framework
# ERROR IF RUN BELOW: "Unable to connect to remote asterisk"
- name: FreePBX - Run 'fwconsole reload' - as an additional precaution, per Ron Raikes @ https://community.freepbx.org/t/asterisk-19-1-0-and-freepbx-install/81029/15
command: fwconsole reload
# 2024-02-25: UGLY / TEMPORARY WORKAROUND #2 OF 2, to bypass... 'In DialplanHooks.class.php line 163: Undefined array key "DialplanHooks"' -- https://github.com/iiab/iiab/pull/3675#issuecomment-1890590227
## ERROR IF RUN BELOW: "Unable to connect to remote asterisk"
#- name: FreePBX - Run 'fwconsole reload' - as an additional precaution, per Ron Raikes @ https://community.freepbx.org/t/asterisk-19-1-0-and-freepbx-install/81029/15
# command: fwconsole reload
# DEFAULT MODULE LIST AUG 2021: https://github.com/iiab/iiab/pull/2916#issuecomment-894601522
# YIELDS 2 MORE AS OF MAY 2022: https://github.com/iiab/iiab/pull/3229#issuecomment-1138566339
- name: FreePBX - Download + Install 15 additional FreePBX default modules (of about 70 total) as if we were installing freepbx-16.0-latest.tgz - THIS CAN TAKE SEVERAL MIN!
# NOTHING CHANGED (?) FEB 2024: https://github.com/iiab/iiab/pull/3675#issuecomment-1963081323
- name: FreePBX - Download + Install 15 additional FreePBX default modules (of about 70 total) as if we were installing freepbx-17.0-latest.tgz - THIS CAN TAKE SEVERAL MIN!
command: fwconsole ma downloadinstall callrecording cdr conferences core customappsreg dashboard featurecodeadmin infoservices logfiles music pm2 recordings sipsettings soundlang voicemail

View file

@ -3,14 +3,20 @@
register: df1
- name: 'Install packages: postgresql, postgresql-client, python3-psycopg2'
- name: 'Install packages: postgresql, postgresql-client'
package:
name:
- postgresql
- postgresql-client
- python3-psycopg2 # For Ansible modules {postgresql_db, postgresql_user} in Ansible collection community.postgresql -- used in moodle/tasks/install.yml
#- python3-psycopg2 # For Ansible modules {postgresql_db, postgresql_user} in Ansible collection community.postgresql -- used in moodle/tasks/install.yml
state: present
- name: pip install 'psycopg' (NEW Psycopg 3) into venv /usr/local/ansible -- for Ansible modules {postgresql_db, postgresql_user} in Ansible collection community.postgresql -- used in moodle/tasks/install.yml
pip:
name: psycopg
virtualenv: /usr/local/ansible
extra_args: "--upgrade --no-cache-dir --prefer-binary" # 2023-10-01: Lifesaver when recent wheels (e.g. piwheels.org) are inevitably not yet built! SEE #3560
- name: Run shell command "pg_config --version" to extract MAJOR version number -- strip off MINOR/PATCH version number(s)
shell: pg_config --version | sed 's/^[^0-9]*//; s/[^0-9].*//'
register: pg_config_version

View file

@ -6,6 +6,7 @@ import os
import json
import subprocess
import shlex
import re
import xml.etree.ElementTree as ET
import iiab.iiab_const as CONST
@ -46,11 +47,17 @@ def get_zim_list(path):
if filename in CONST.old_zim_map: # handle old names that don't parse
perma_ref = CONST.old_zim_map[filename]
else:
ulpos = filename.rfind("_")
# but old gutenberg and some other names are not canonical
if filename.rfind("-") < 0: # non-canonical name
ulpos = filename[:ulpos].rfind("_")
perma_ref = filename[:ulpos]
# handle various zim name patterns:
# 1. canonical zim ending in _YYYY-MM
# as of 10/16/2024 it looks like all Kiwix zims fit this pattern
# 2. otherwise assume no versioning and perma_ref = filename
match = re.search("_[0-5][0-9][0-5][0-9]-[0-5][0-9]$", filename)
if match:
perma_ref = filename[: match.span()[0]]
else:
perma_ref = filename
zim_info['file_name'] = filename
zim_versions[perma_ref] = zim_info # if there are multiples, last should win
return files_processed, zim_versions

View file

@ -2,7 +2,7 @@
Remote.it can be a [great way](https://docs.remote.it/introduction/get-started/readme) to remotely support an Internet-in-a-Box (IIAB).
As of [2023](https://remote.it/pricing/), 5 IIAB devices can be managed for free (their personal / non-commercial plan) and larger numbers for $10+/month.
As of [2024](https://remote.it/pricing/), 5 IIAB devices can be managed for free (their personal / non-commercial plan) and larger numbers for $10+/month.
For other approaches, please see [FAQ.IIAB.IO](https://wiki.iiab.io/go/FAQ) -> "How can I remotely manage my Internet-in-a-Box?"

View file

@ -1,4 +1,4 @@
# sshd_install: True # Required by OpenVPN
# sshd_install: True
# sshd_enabled: True
# sshd_port: 22 # Not fully functional. SEE: roles/sshd/tasks/install.yml

View file

@ -9,8 +9,8 @@
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
sugarizer_dir_version: sugarizer-1.7.0 # WAS: sugarizer-1.0, sugarizer-master, sugarizer-1.1.0, sugarizer-1.2.0, sugarizer-1.3.0, sugarizer-1.4.0, sugarizer-1.5.0, sugarizer-1.6.0
sugarizer_git_version: v1.7.0 # WAS: v1.0.1, master, v1.1.0, v1.2.0, v1.3.0, v1.4.0, v1.5.0, v1.6.0
sugarizer_dir_version: sugarizer-1.8.0 # WAS: sugarizer-1.0, sugarizer-master, sugarizer-1.1.0, sugarizer-1.2.0, sugarizer-1.3.0, sugarizer-1.4.0, sugarizer-1.5.0, sugarizer-1.6.0, sugarizer-1.7.0
sugarizer_git_version: v1.8.0 # WAS: v1.0.1, master, v1.1.0, v1.2.0, v1.3.0, v1.4.0, v1.5.0, v1.6.0, v1.7.0
# PLEASE HELP MONITOR https://github.com/llaske/sugarizer/releases
sugarizer_server_dir_version: sugarizer-server-1.5.0 # WAS: sugarizer-server-1.0, sugarizer-server-master, sugarizer-server-dev, sugarizer-server-1.1.0, sugarizer-server-1.1.1, sugarizer-server-1.2.0, sugarizer-server-1.3.0, sugarizer-server-1.4.0

View file

@ -0,0 +1,113 @@
- name: Record (initial) disk space used
shell: df -B1 --output=used / | tail -1
register: df1
- name: "Set up apt source (jammy) in /etc/apt/sources.list.d/tailscale.list and its key /usr/share/keyrings/tailscale-archive-keyring.gpg, to install Tailscale"
shell: |
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.noarmor.gpg > /usr/share/keyrings/tailscale-archive-keyring.gpg
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.tailscale-keyring.list > /etc/apt/sources.list.d/tailscale.list
- name: "Install packages: jq, sudo, tailscale"
package:
name:
#- ncat # Newer versions of NMap do not include NCat, WAS needed to announce openvpn_handle (if Debian > 9 or Ubuntu > 18)
#- nmap
- jq # JSON parser used by /usr/bin/iiab-support == /usr/bin/iiab-vpn
- sudo # (1) Should be installed prior to installing IIAB, (2) Can also be installed by 1-prep here, (3) Is definitely installed by 1-prep's roles/iiab-admin/tasks/sudo-prereqs.yml, (4) Used to be installed by roles/2-common/tasks/packages.yml (but that's too late!)
- tailscale
update_cache: yes
- name: Set up tab completion for 'tailscale' at the command-line
shell: mkdir -p /etc/bash_completion.d && tailscale completion bash > /etc/bash_completion.d/tailscale
- name: "Install ssh public keys for remote support (only runs if 'tailscale_install: True')"
lineinfile:
line: "{{ item.pubkey }}"
regexp: "{{ item.regexp }}"
path: /root/.ssh/authorized_keys
with_items:
- regexp: "LvCSAAcfYIdZPR4ePVpVUZ/IbkGjpQSoRMa5HuVjMO3cZNR27ptqjNjq2husJOyhMFCOBTzo4thioGyTpBr4u3s=$" # Tim Moody
pubkey: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAhlQIh8ZPx4awdM0O6QNcPbx3qIZ39FHjF2YJ2SX3z7iLnYiz03Ek6Bux9P4HvaVAqlApiz2I68Vq8TfU2s/+LvCSAAcfYIdZPR4ePVpVUZ/IbkGjpQSoRMa5HuVjMO3cZNR27ptqjNjq2husJOyhMFCOBTzo4thioGyTpBr4u3s="
- regexp: "tUM4hl009fbXY4Yy3bAadWL1CquVrZmKfBBWhyhz8zLD6TQ== ghunt@ip-192-168-123-123.ec2.internal$"
pubkey: "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxAmjU7VojyK+0Pjp2p8CCGTNBtE565A/L8IVbAT8MIucRE9LN1g5LjGnOHUShFJpwuTR1JLX2r9EDRMsf9MmyTgUAnuyP005giWVHXLPtjyjTzbsJ1DEtXRytulmF+GlCOaqPWNde6EOmReqPHbmjIQpRZ/Sc8hziS4jVSQuBA9EhaBmZ62CPqK33mPJvnpwMtdd6nHXAcXsZhStd3NhVDm27+B3sHI6mr2w7ExdBXE5DKiZL2po8n2y4hJYZreJopbjcQmv4oWdDWvPu5I92xDgYCsqcE7zSrv1um+tUM4hl009fbXY4Yy3bAadWL1CquVrZmKfBBWhyhz8zLD6TQ== ghunt@ip-192-168-123-123.ec2.internal"
- regexp: "heOMXXNU6skxdPh2fcHh0bzQcaCSQ== holt@crank$"
pubkey: "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApHPly+EA1M4bispl3AulTLjyYCjcJzh6s779K3epDkqh600a+fHsdIiddWCAfIonRq+9MJyOiaNQ+WYLOuajI1IiFZWFt45xDAiyCUnyuT+ytAX+IA3TgTwgTZPfzDOzI8rDRV9Sgl+LZLfPno7T3qxcGx2l51bRk+koRK+Txpph//M3jGvsFmTKhjvfxgEIUmMH9SkASxEdyqASr0+/+uLR92MnT+8CT1pOYYoJyZp9Lta5eGqJvbEmd3Dn7MXqD3vXE57o4rBJ0bR3q5LK59WVNxNQbulJ9z5V7aTJ4AbBFQWxm0fH0gBx+heOMXXNU6skxdPh2fcHh0bzQcaCSQ== holt@crank"
# CLARIF: plus signs (+) in public keys cause duplicate key additions (above)
# and failure during removal (below) as "+" has a special meaning as
# interpreted in a Python regexp, as implemented by Ansible's lineinfile module:
# https://docs.python.org/2/library/re.html
# WORKAROUND: the tail end of each public key (after the last plus sign) is
# being used (instead of the full key) as an abbreviated regexp for now.
# A backslash in front of each plus sign (+) would also work.
# - name: Remove those ssh public keys, if not tailscale_enabled
# lineinfile:
# regexp: "{{ item }}"
# path: /root/.ssh/authorized_keys
# state: absent
# with_items:
# - "LvCSAAcfYIdZPR4ePVpVUZ/IbkGjpQSoRMa5HuVjMO3cZNR27ptqjNjq2husJOyhMFCOBTzo4thioGyTpBr4u3s=$"
# - "tUM4hl009fbXY4Yy3bAadWL1CquVrZmKfBBWhyhz8zLD6TQ== ghunt@ip-192-168-123-123.ec2.internal$"
# - "heOMXXNU6skxdPh2fcHh0bzQcaCSQ== holt@crank$"
# when: not tailscale_enabled
- name: Install /usr/bin/iiab-vpn & /usr/bin/iiab-vpn-off (BACKS UP FILES IF CHANGED)
template:
src: "{{ item }}"
dest: /usr/bin/
mode: '0755'
backup: yes
with_items:
- iiab-vpn
- iiab-vpn-off
- name: Symlink /usr/bin/iiab-vpn-on -> /usr/bin/iiab-vpn
file:
src: /usr/bin/iiab-vpn
path: /usr/bin/iiab-vpn-on
state: link
- name: Symlink /usr/bin/iiab-support -> /usr/bin/iiab-vpn
file:
src: /usr/bin/iiab-vpn
path: /usr/bin/iiab-support
state: link
- name: Symlink /usr/bin/iiab-support-on -> /usr/bin/iiab-vpn
file:
src: /usr/bin/iiab-vpn
path: /usr/bin/iiab-support-on
state: link
- name: Symlink /usr/bin/iiab-support-off -> /usr/bin/iiab-vpn-off
file:
src: /usr/bin/iiab-vpn-off
path: /usr/bin/iiab-support-off
state: link
# RECORD Tailscale AS INSTALLED
- name: Record (final) disk space used
shell: df -B1 --output=used / | tail -1
register: df2
- name: Add 'tailscale_disk_usage = {{ df2.stdout|int - df1.stdout|int }}' to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
section: tailscale
option: tailscale_disk_usage
value: "{{ df2.stdout|int - df1.stdout|int }}"
- name: "Set 'tailscale_installed: True'"
set_fact:
tailscale_installed: True
- name: "Add 'tailscale_installed: True' to {{ iiab_state_file }}"
lineinfile:
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
regexp: '^tailscale_installed'
line: 'tailscale_installed: True'

View file

@ -0,0 +1,47 @@
# http://FAQ.IIAB.IO -> "How can I remotely manage my Internet-in-a-Box?"
# "How do i fail a task in Ansible if the variable contains a boolean value?
# I want to perform input validation for Ansible playbooks"
# https://stackoverflow.com/questions/46664127/how-do-i-fail-a-task-in-ansible-if-the-variable-contains-a-boolean-value-i-want/46667499#46667499
# We assume 0-init/tasks/validate_vars.yml has DEFINITELY been run, so no need
# to re-check whether vars are defined here. As Ansible vars cannot be unset:
# https://serverfault.com/questions/856729/how-to-destroy-delete-unset-a-variable-value-in-ansible
- name: Assert that "tailscale_install is sameas true" (boolean not string etc)
assert:
that: tailscale_install is sameas true
fail_msg: "PLEASE SET 'tailscale_install: True' e.g. IN: /etc/iiab/local_vars.yml"
quiet: yes
- name: Assert that "tailscale_enabled | type_debug == 'bool'" (boolean not string etc)
assert:
that: tailscale_enabled | type_debug == 'bool'
fail_msg: "PLEASE GIVE VARIABLE 'tailscale_enabled' A PROPER (UNQUOTED) ANSIBLE BOOLEAN VALUE e.g. IN: /etc/iiab/local_vars.yml"
quiet: yes
- name: Install Tailscale if 'tailscale_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: tailscale_installed is undefined
#- include_tasks: enable-or-disable.yml
- name: Add 'tailscale' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
section: tailscale
option: "{{ item.option }}"
value: "{{ item.value | string }}"
with_items:
- option: name
value: Tailscale (VPN)
- option: description
value: '"Tailscale enables live/remote support by connecting machines anywhere on the Internet, using a software-defined mesh virtual private network (VPN), and optional web-based management service."'
- option: tailscale_install
value: "{{ tailscale_install }}"
- option: tailscale_enabled
value: "{{ tailscale_enabled }}"

View file

@ -0,0 +1,71 @@
#!/bin/bash
# USEFUL DOCS:
# https://tailscale.com/kb/1080/cli#status
# https://headscale.net/stable/usage/connect/android/
# https://headscale.net/stable/usage/connect/apple/
# https://headscale.net/stable/usage/connect/windows/
VPN_URL=https://iiab.net
VPN_KEY="$1"
# if tailscale status > /dev/null; then # MANY IMPERFECT TESTS OF TAILNET CONNECTIVITY: tailscale0 CAN lose its IP address, as shown by 'ip a' and 'hostname -I' (testing 'systemctl is-active tailscaled' is likely no better!) Unclear if 'tailscale status --json | jq -r .Self.Online' is much better? Maybe explore 'tailscale debug --help' and 'tailscale debug prefs' for a cleaner/authoritative verdict? Or use + display string output of 'systemctl show tailscaled --property=StatusText' e.g. 'StatusText=Connected; iiab; 100.64.0.4' ? (OR JUST DON'T WORRY ABOUT IT, AS THE ~3 'tailscale up' COMMANDS BELOW ARE MORE PROACTIVE... AND APPEAR FAST + SAFE!)
# echo -e "\n\033[1;33mAlready connected to VPN!?\033[0m"
# else
# [NEST ~20 LINES OF IF STATEMENTS FURTHER BELOW?]
# Check that current profile key still exists in /var/lib/tailscale/tailscaled.state ? (As 'tailscale logout' wipes it!) In the end, these are 3 lousy tests...
# if [ -f /var/lib/tailscale/tailscaled.state ] && [[ $(grep -c $(jq -r '."_current-profile"' /var/lib/tailscale/tailscaled.state) /var/lib/tailscale/tailscaled.state) > 1 ]]; then
# if ! [[ $(tailscale status | tr '[:upper:]' '[:lower:]') =~ "logged out" ]]; then
# if [[ $(tailscale status --json | jq -r .CurrentTailnet.Name) = "iiab.community" ]]; then
# UX Optimization: {iiab-vpn, iiab-support} can be run WITHOUT key *IF* .BackendState is "Stopped" or "Running" *AND* .ControlURL is $VPN_URL (avoid their default, https://controlplane.tailscale.com !)
if [[ $(tailscale status --json | jq -r .BackendState) != "NeedsLogin" && $(tailscale debug prefs | jq -r .ControlURL) = $VPN_URL ]]; then
if ! tailscale up --login-server "$VPN_URL" --timeout 8s; then # (Re-)passing $VPN_URL is overkill on this line, but can't hurt!
echo -e "\n\033[41;1mERROR $?: Failed to connect to VPN\033[0m\n"
exit 1
fi
elif [ -z $VPN_KEY ]; then
echo -e "\n\033[1;33mVPN key required!\033[0m\n\nEmail holt@unleashkids.org to explain your need?\n"
exit 1
else
if ! tailscale up --login-server "$VPN_URL" --auth-key "$VPN_KEY" --timeout 8s; then
echo -e "\n\033[41;1mERROR $?: Failed to connect to VPN, so let's try --force-reauth\033[0m\n"
# If 'tailscale up' just above fails w/ exit code 1 ~= "can't change --login-server without --force-reauth" (i.e. if switching login server, e.g. to/from their default (https://controlplane.tailscale.com) -- SEE ALSO: 'tailscale switch -h' and https://tailscale.com/blog/fast-user-switching) then more "brute force" is attempted below...
# https://github.com/tailscale/tailscale/issues/3849 "Please warn that --force-reauth immediately disconnects" (brute force, only as a last resort!)
# https://github.com/tailscale/tailscale/issues/4854 "Tailscale CLI has poor UX with expiring keys" (long-term node keys thankfully mitigate this!)
if ! tailscale up --login-server "$VPN_URL" --auth-key "$VPN_KEY" --force-reauth --timeout 8s; then
echo -e "\n\033[41;1mERROR $?: Failed to connect to VPN, even with --force-reauth\033[0m\n"
exit 1
fi
fi
fi
# jq 1.7 (2023-09-05) on new OS's also allows new syntax... jq -r .Node.Tags.[]
# Can also work: tailscale whois --json $(tailscale ip -1) | jq -r .Node.Tags[])
echo -e "\n\033[44;37mCheck that VPN ($(tailscale status --json | jq -r .Self.Tags[])) is now live:\033[0m\n"
echo -e " hostname -I"
echo -e " tailscale ip"
echo -e " tailscale status"
echo -e " tailscale whois $(tailscale ip -1)"
echo -e " tailscale whois --json $(tailscale ip -1) | jq .Node.Endpoints,.Node.Hostinfo"
echo -e " tailscale ping --verbose [IP or HOSTNAME]"
echo -e " tailscale status --json | jq"
echo -e " systemctl status tailscaled\n"
echo -e "\033[4mTo disconnect from VPN:\033[0m\n"
echo -e " tailscale down\n"
echo -e "\033[4mTo permanently log out of VPN:\033[0m\n"
echo -e " tailscale logout\n"
# More useful table of IPs/usernames/etc than 'tailscale status'
#echo -e "\033[44;37mVPN peers: (rightmost column = online/offline)\033[0m\n"
#tailscale status --json | jq -r '.Self,.Peer[] | .Tags[] + " " + .TailscaleIPs[] + " " + .HostName + " " + .DNSName + " " + .OS + " " + .Relay + " " + (.Online|tostring)' | sort -V | column -t
#echo -e '\033[44;37mVPN peers: ("true" in 6th column means online)\033[0m\n'
echo -e '\033[44;37mVPN peers: (6th column = online/offline)\033[0m\n'
# (try .Tags[] catch "-") is safer than (.Tags[]? // "-") according to: https://stackoverflow.com/questions/54794749/jq-error-at-stdin0-cannot-iterate-over-null-null
tailscale status --json | jq -r '.Self,.Peer[] | (try .Tags[] catch "-") + " " + .TailscaleIPs[] + " " + .HostName + " " + .DNSName + " " + (if .Relay == "" then "-" else .Relay end) + " XXX" + (.Online|tostring) + "XXX " + .OS' | sort -V | column -t | \
while read l; do
line=$(echo "$l" | sed 's/ XXXtrueXXX /\\033[0;32m ✅\\033[0m/ ; s/ XXXfalseXXX /\\033[0;31m ❌ \\033[0m/')
echo -e "$line" $(tailscale whois --json $(echo $line | cut -d' ' -f2) | jq -r '.Node.Hostinfo | .Distro + " " + .DistroVersion + " " + .DeviceModel');
done
echo

View file

@ -0,0 +1,7 @@
#!/bin/bash
tailscale down
echo -e "\n\e[44;1mDisconnecting from VPN...\e[0m\n"
echo -e "\e[4mTo permanently log out of VPN:\e[0m\n" # Expires machine node key, from /var/lib/tailscale/tailscaled.state
echo -e " tailscale logout\n" # ...as seen by 'tailscale status --json' (related: 'tailscale debug prefs')

View file

@ -86,6 +86,8 @@ Known Issues
* Random Ports: Currently it is not possible to use random ports in the range 49152-65535, as it's difficult to open multiple ports in IIAB's `iptables-based firewall <https://github.com/iiab/iiab/wiki/IIAB-Networking#firewall-iptables>`_.
* transmission-daemon (4.0.6 or 4.1-dev) install onto Ubuntu 24.04 or 24.10, but (1) its systemd service times out (fails to start) (2) rebooting kinda helps, but service then crashes on 1st visit to http://box:9091 `#3756 <https://github.com/iiab/iiab/issues/3756>`_
Troubleshooting
---------------

View file

@ -2,30 +2,34 @@
usb_lib README
==============
**PLEASE SEE "Can teachers display their own content?" WITHIN http://FAQ.IIAB.IO FOR UP-TO-DATE DOCUMENTATION.**
**PLEASE SEE** `"Can teachers display their own content?" <https://wiki.iiab.io/go/FAQ#Can_teachers_display_their_own_content?>`_ **AND** `"Can students upload their own work?" <https://wiki.iiab.io/go/FAQ#Can_students_upload_their_own_work?>`_ **WITHIN https://FAQ.IIAB.IO FOR UP-TO-DATE DOCUMENTATION!**
This role implements functionality similar to LibraryBox, to mount "teacher content" from USB drives.
This role (1) implements functionality similar to LibraryBox, to mount "teacher content" from USB sticks / drives for students, and (2) allows students to upload their work to the teacher's USB stick / drive:
Users should have nearly immediate access to this "teacher content" (on all inserted USB drives) by browsing to http://box/usb
#. Students should have nearly immediate access to "teacher content" (on all inserted USB sticks) by browsing to http://box/usb.
#. Students can also click the "Upload to USB" button on top of this same page (http://box/usb), to upload their work to the teacher's USB stick. (FYI student uploads appear in folders like ``UPLOADS.YYYY-MM-DD`` within the root of the teacher's USB stick).
Automount is handled by usbmount, and scripts in this role look in the root of the mounted drive for...
As of January 2025, automount is handled by usbmount: (`devmon included with udevil <https://ignorantguru.github.io/udevil/>`_ might be considered in future)
* /usb
* /USB
* /share
* /Share
* /Piratebox/Share
* A script in this role (/etc/usbmount/mount.d/70-usb-library) looks in the root of the mounted USB stick for folder /PUBLIC and if found, creates a symlink of the form /library/www/html/local_content/USBn pointing to /media/usbn/PUBLIC — where n is generally one of {0, 1, 2, 3, 4, 5, 6, 7}. *RESULT: Only documents within /PUBLIC are browsable by students.* This option is very useful to **prevent students from copying uploaded homework!**
* If however folder /PUBLIC is not found, the symlink is created to the root of the mounted USB stick. *RESULT: EVERYTHING on the USB stick is browsable by students — just like with a traditional community bulletin board.* This option is very useful when students are uploading artwork, photo essays, personal audio recordings and **science projects that are intended to be shared!**
...and if found, creates a symlink of the form /library/www/html/local_content/USBn pointing to /media/usbn — where n is generally one of {0, 1, 2, 3, 4, 5, 6, 7}.
Technical Details:
USB drives must be formatted with one of the filesystems listed under "FILESYSTEMS=" at ``/etc/usbmount/usbmount.conf`` — these are specified on/around Line 76 of: `/opt/iiab/iiab/roles/usb_lib/tasks/install.yml <https://github.com/iiab/iiab/blob/master/roles/usb_lib/tasks/install.yml#L76>`_
* USB sticks / drives must be formatted with one of the filesystems listed under "FILESYSTEMS=" at ``/etc/usbmount/usbmount.conf`` — these are specified on/around Line 17 of: `/opt/iiab/iiab/roles/usb_lib/files/usbmount/usbmount.conf <https://github.com/iiab/iiab/blob/master/roles/usb_lib/files/usbmount/usbmount.conf#L17>`_
IIAB will generally mount USB drives 'rw' allowing root to both read and write to them. In addition, in March 2021 (`PR #2715 <https://github.com/iiab/iiab/issues/2715>`_) Kolibri exports were enabled by also giving non-root users read and write access to VFAT/FAT32, NTFS and exFAT USB drives, using ``umask=0000`` (in /etc/usbmount/usbmount.conf) to override the ``umask=0022`` default. If however you prefer to restore usbmount's default, set ``usb_lib_umask0000_for_kolibri: False`` in `/etc/iiab/local_vars.yml <http://FAQ.IIAB.IO/#What_is_local_vars.yml_and_how_do_I_customize_it%3F>`_ (preferably do this prior to installing IIAB).
* If your IIAB was built on a Graphical Desktop OS (instead of a headless OS, like Raspberry Pi OS Lite), USB sticks will problematically be mounted twice by default, once by usbmount and once by the desktop. You must disable the automount function in the Desktop in order to use the "Upload to USB" functionality, which allows students to upload their work to your USB stick.
Official `usbmount 0.0.22 (2011-08-08) <https://github.com/rbrito/usbmount/releases>`_ documentation:
* EXAMPLE: To disable Desktop automount within "Raspberry Pi OS with desktop", go to File Manager (pcmanfm) → Edit → Preferences → Volume Management, and uncheck "Mount removable media automatically when they are inserted".
* https://github.com/hfuchs/usbmount/blob/master/README (2010-08-11)
* https://github.com/rbrito/usbmount/blob/master/README.md (2018-08-10)
* https://github.com/rbrito/usbmount/blob/master/usbmount.conf (2010-04-25)
* IIAB will generally mount USB sticks / drives 'rw' allowing root to both read and write to them. In addition, in March 2021 (`PR #2715 <https://github.com/iiab/iiab/pull/2715>`_) Kolibri exports were enabled, by also giving non-root users read and write access to VFAT/FAT32, NTFS and exFAT USB sticks — using ``umask=0000`` (in /etc/usbmount/usbmount.conf) to override the ``umask=0022`` default. This ``umask=0000`` is also required for students to upload to the teachers's VFAT/FAT32, NTFS and exFAT USB sticks, as introduced in January 2025 (`PR #3875 <https://github.com/iiab/iiab/pull/3875>`_). If, however, you prefer to restore usbmount's default, set ``usb_lib_writable_sticks: False`` in `/etc/iiab/local_vars.yml <http://FAQ.IIAB.IO/#What_is_local_vars.yml_and_how_do_I_customize_it%3F>`_ — please do this prior to installing IIAB — so you don't have to run: ``cd /opt/iiab/iiab ; ./runrole --reinstall usb_lib``
Legacy warning: There is also a patch for problems with automount on Fedora 21+. Please note that as of 4.1.8-200.fc22.x86_64 not all USB drives will mount, even with this patch.
* Official `usbmount 0.0.22 (2011-08-08) <https://github.com/rbrito/usbmount/tags>`_ documentation:
* https://github.com/hfuchs/usbmount/blob/master/README (2010-08-11)
* https://github.com/rbrito/usbmount/blob/master/README.md (2018-08-10)
* https://github.com/rbrito/usbmount/blob/master/usbmount.conf (2010-04-25)
* Dev Notes at the top of: https://github.com/iiab/iiab/blob/master/roles/usb_lib/tasks/install.yml
* January 2025 work to improve automount reliability during boot: `PR #3916 <https://github.com/iiab/iiab/pull/3916>`_

View file

@ -1,12 +1,9 @@
# usb_lib_install: True
# usb_lib_enabled: True
# Show entire contents of USB sticks/drives (at http://box/usb)
# iiab_usb_lib_show_all: True
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
# Kolibri can export & import channels to USB sticks/drive:
# usb_lib_umask0000_for_kolibri: True
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf for
# Kolibri exports, and student uploads to teacher's USB stick (http://box/usb)
# usb_lib_writable_sticks: True
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!

View file

@ -0,0 +1,19 @@
<style>
.button {
background-color: #343a40;
border: none;
border-radius:.25rem;
color: white;
padding: .5rem .75rem;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 1rem;
font-weight:bold;
float:right;
}
.button:hover {
color: #ddd;
}
</style>
<a class="button" href="/upload2usb/">Upload to USB</a>

View file

@ -0,0 +1,15 @@
<?php
/*
* error.php
* Upload2USB App error
*/
?>
ERROR: Please make sure <span style="color:red; font-weight:bold;"> one and ONLY one </span>(no more, no less) removable USB stick is plugged into your Internet-in-a-Box. Please see IIAB FAQ, "<a href="https://wiki.iiab.io/go/FAQ#Can_students_upload_their_own_work%3F" style="font-weight:bold;">Can students upload their own work?</a>", for additional support.
<br/><br/>
<pre><?php if (isset($exception)) {echo (string)$exception;} ?></pre>

View file

@ -0,0 +1,14 @@
<?php
/*
* footer.php
* Upload2USB App Footer for all User Facing Pages
*/
?>
</div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,32 @@
<?php
/*
* header.php
* Upload2USB App Header for all User Facing Pages
*/
include("upload2usb.php");
?>
<!DOCTYPE html>
<html>
<head>
<title><?php echo $title ?></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/common/css/bootstrap4.min.css"/>
<link rel="stylesheet" href="/common/css/fa.all.min.css"/>
<link rel="stylesheet" href="/common/css/font-faces.css"/>
<script src="/common/js/jquery.min.js"></script>
<script src="/common/js/bootstrap4.min.js"></script>
</head>
<body class="text-center" style="background-color:#f5f5f5;">
<div id="container" class="container">
<div class="row">
<div class="col-sm-6 offset-sm-3 text-center" style="padding:15px;">
<a href="/usb/"><img class="mb-4" src="uk-swing.png" alt="" width="75"></a>
<h1 class="h3 mb-3 font-weight-normal"><?php echo $title ?></h1>

View file

@ -0,0 +1,24 @@
<?php
/*
* index.php
* Upload2USB App Index Page
*/
$title = "Upload to USB";
include("header.php");
//Check if folder for today exists, and get file count if it does
$file_count = getFileCount(getTargetFolderPath(0));
?>
<form action="upload-file.php" id="upload2usb_form" method="post" enctype="multipart/form-data">
<label for="upload2usb" style="font-weight:bold;padding-bottom:10px;">Upload your file here!</label><br/>
<input type="file" name="uploaded_file" id="uploaded_file"><br/><br/>
<button class="btn btn-dark" name="submit" type="submit" style="width:150px;">Upload</button>
</form>
<br/>
<?php echo $file_count ?> files have been uploaded today!
<?php include ("footer.php"); ?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View file

@ -0,0 +1,58 @@
<?php
/*
* upload-file.php
* Upload2USB App - Process Submission
*/
$title = "Upload to USB Results";
include("header.php");
//get folder path where file will be stored
$target_folder_path = getTargetFolderPath(1);
$uploaded_filename = basename($_FILES["uploaded_file"]["name"]);
$target_file = $target_folder_path . "/" . $uploaded_filename;
$upload_ok = 1;
$upload_msg = "";
if(!isset($_POST["submit"]) || !is_uploaded_file($_FILES['uploaded_file']['tmp_name'])) {
$upload_msg = "No file uploaded!";
$upload_ok = 0;
} elseif (!isFileMimeTypeAcceptable($_FILES["uploaded_file"]["tmp_name"])) {
$upload_msg = "You cannot upload zips, executables, xml, or binary files!";
$upload_ok = 0;
} elseif (file_exists($target_file)) {
if (!isFileContentUnique($target_folder_path, $_FILES["uploaded_file"]["tmp_name"])) {
$upload_msg = "This file already exists!";
$upload_ok = 0;
} else {
// rename file so name is unique
$new_filename = getUniqueFileName($target_folder_path, $uploaded_filename);
$target_file = $target_folder_path . "/" . $new_filename;
}
}
// Check if $upload_ok is set to 0 by an error
if ($upload_ok == 0) {
$upload_msg = "&#x274C; Your file was not uploaded. " . $upload_msg;
// if everything is ok, try to upload file
} else {
if (move_uploaded_file($_FILES["uploaded_file"]["tmp_name"], $target_file)) {
$upload_msg = "&#x1F60A; &#x2705; Your file <span style=\"font-weight:bold; font-style:italic;\">". htmlspecialchars( $uploaded_filename ). "</span> was successfully uploaded!";
} else {
$upload_ok = 0;
throw new RuntimeException('There was an error uploading your file. <br/><br/>');
}
}
$file_count = getFileCount($target_folder_path);
?>
<?php echo $upload_msg ?> <br/>
<?php echo $file_count ?> files have been uploaded today!
<?php include ("footer.php"); ?>

View file

@ -0,0 +1,101 @@
<?php
/*
* upload2usb.php
* Upload2USB App Helper Functions
*/
set_exception_handler(function (Throwable $exception) {
error_log('UPLOAD2USB ERROR: ' . (string)$exception);
include ("error.php");
});
//return the first removable USB drive location
function getTargetUSBDriveLocation () {
// Get the count of storage mounted at /media, and error if there is <>1 otherwise return upload path
# error if 1<>usb sticks are installed
$rmv_usb_path_count = shell_exec('lsblk --output NAME,TRAN,RM,MOUNTPOINT --pairs | cut -d " " -f 4 | grep "^MOUNTPOINT=\"/media" | wc -l');
if ($rmv_usb_path_count == 0) {
throw new RuntimeException('0 USB sticks found. <br/><br/>');
} elseif ($rmv_usb_path_count > 1) {
throw new RuntimeException('More than 1 USB sticks installed. <br/><br/>');
}
$rmv_usb_path = trim(str_replace('"', '', shell_exec('lsblk --output NAME,TRAN,RM,MOUNTPOINT --pairs | cut -d " " -f 4 | grep "^MOUNTPOINT=\"/media" | cut -d "=" -f 2')));
if (empty($rmv_usb_path)) {
throw new RuntimeException('Not able to find USB stick. <br/><br/>');
} else {
return $rmv_usb_path . "/";
}
}
//returns folder path where file will be stored, if create_folder_p = 1, it will create the folder if it doesn't exist
function getTargetFolderPath ($create_folder_p) {
$parent_dir = getTargetUSBDriveLocation();
$today_folder_name = "UPLOADS." . date("Y-m-d");
$target_folder_path = $parent_dir . $today_folder_name;
if (!file_exists($target_folder_path) && $create_folder_p) {
mkdir($target_folder_path, 0777) or throw new RuntimeException("Not able to create upload directory. <br/>Make sure 'usb_lib_writable_sticks' is set to 'True'. <br/><br/>");
}
return $target_folder_path;
}
//return number of files within a specified folder
function getFileCount ($folder_path) {
return count(glob($folder_path . "/*"));
}
//check if file mimetype is acceptable for upload
function isFileMimeTypeAcceptable ($file) {
$mimetype = strtolower(mime_content_type($file));
$invalid_mimetypes_str = array ("compress", "image/svg+xml", "octet", "text/xml", "xhtml+xml");
foreach ($invalid_mimetypes_str as $invalid_mt_str) {
if (str_contains($mimetype, $invalid_mt_str)) {
error_log('UPLOAD2USB ERROR - MIMETYPE: ' . $mimetype);
return false;
}
}
return true;
}
//check file content to see if it's unique or not
function isFileContentUnique ($target_folder_path, $file) {
$file_to_upload_md5 = md5_file($file);
$usb_dir = array_diff(scandir($target_folder_path), array('..', '.'));
foreach ($usb_dir as $dir_file) {
$dir_file = $target_folder_path . "/" . $dir_file;
if (!is_dir($dir_file)) {
$dir_file_md5 = md5_file($dir_file);
if ($file_to_upload_md5 == $dir_file_md5) {
return false;
}
}
}
return true;
}
//return unique filename
function getUniqueFileName ($target_folder_path, $filename) {
$new_filename = $filename;
$counter = 1;
while (file_exists($target_folder_path . "/" . $new_filename)) {
$counter++;
$new_filename = pathinfo($filename,8) . '-'. $counter . "." . pathinfo($filename,4);
}
return $new_filename;
}
// Check file size - we are not going to check file size for now.
// elseif ($_FILES["uploaded_file"]["size"] > 5000000) {
// $upload_msg = "Your file is too large.";
// $upload_ok = 0;
// }
?>

View file

@ -0,0 +1,17 @@
Format: http://dep.debian.net/deps/dep5/
Upstream-Name: usbmount
Upstream-Contact: Martin Dickopp <martin@zero-based.org>, Rogério Brito <rbrito@ime.usp.br>
Source: git://git.debian.org/usbmount/usbmount.git
Files: *
Copyright: 2004-2007, Martin Dickopp <martin@zero-based.org>
2008-2011, Rogério Brito <rbrito@ime.usp.br>
License: BSD-2
This package is free software; the copyright holder gives unlimited
permission to copy and/or distribute it, with or without
modifications, as long as this notice is preserved.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY, to the extent permitted by law; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

View file

@ -0,0 +1,235 @@
#!/bin/sh
# This script mounts USB mass storage devices when they are plugged in
# and unmounts them when they are removed.
# Copyright © 2004, 2005 Martin Dickopp
# Copyright © 2008, 2009, 2010 Rogério Theodoro de Brito
# Copyright © 2025, Jerry Vonau
#
# This file is free software; the copyright holder gives unlimited
# permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# https://github.com/iiab/iiab/blob/master/roles/usb_lib/files/usbmount/copyright
# https://github.com/rbrito/usbmount/blob/master/debian/copyright
#set -e
exec > /dev/null 2>&1
######################################################################
# Auxiliary functions
# Log a string via the syslog facility.
log()
{
if [ $1 != debug ] || expr "$VERBOSE" : "[yY]" > /dev/null; then
logger -p user.$1 -t "usbmount[$$]" -- "$2"
fi
}
# Test if the first parameter is in the list given by the second
# parameter.
in_list()
{
for v in $2; do
[ "$1" != "$v" ] || return 0
done
return 1
}
######################################################################
# Main program
# Default values for configuration variables.
ENABLED=1
MOUNTPOINTS=
FILESYSTEMS=
MOUNTOPTIONS=
FS_MOUNTOPTIONS=
VERBOSE=no
if [ -r /etc/usbmount/usbmount.conf ]; then
. /etc/usbmount/usbmount.conf
log debug "loaded usbmount configurations"
fi
if [ "${ENABLED:-1}" -eq 0 ]; then
log info "usbmount is disabled, see /etc/usbmount/usbmount.conf"
exit 0
fi
if [ ! -x /sbin/blkid ]; then
log err "cannot execute /sbin/blkid"
exit 1
fi
if [ "$1" = add ]; then
# Per Policy 9.3.2, directories under /var/run have to be created
# after every reboot.
if [ ! -e /var/run/usbmount ]; then
mkdir -p /var/run/usbmount
log debug "creating /var/run/usbmount directory"
else
log debug "/var/run/usbmount exists"
fi
umask 022
# Acquire lock.
log debug "trying to acquire lock /var/run/usbmount/.mount.lock"
lockfile-create --retry 6 /var/run/usbmount/.mount || \
{ log err "cannot acquire lock /var/run/usbmount/.mount.lock"; exit 1; }
trap '( lockfile-remove /var/run/usbmount/.mount )' 0
log debug "acquired lock /var/run/usbmount/.mount.lock"
# Grab device information from device and "divide it"
# FIXME: improvement: implement mounting by label (notice that labels
# can contain spaces, which makes things a little bit less comfortable).
DEVINFO=$(/sbin/blkid -p $DEVNAME)
FSTYPE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;')
UUID=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]UUID="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;')
USAGE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]USAGE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;')
if ! echo $USAGE | egrep -q "(filesystem|disklabel)"; then
log debug "/$DEVNAME does not contain a filesystem or disklabel"
lockfile-remove /var/run/usbmount/.mount
exit
fi
log debug "/$DEVNAME contains filesystem type $FSTYPE"
BOOTFW_DEV=$(/usr/bin/findmnt -no source /boot/firmware)
log debug "BOOTFW_DEV $BOOTFW_DEV"
ROOT_DEV=$(/usr/bin/findmnt -no source /)
log debug "ROOT_DEV $ROOT_DEV"
BOOT_DEV=$(/usr/bin/findmnt -no source /boot)
log debug "BOOT_DEV $BOOT_DEV"
if [ $BOOTFW_DEV = /$DEVNAME ]; then
log debug "skipping BOOTFS_DEV $BOOTFS_DEV mounted at /boot/firmware"
lockfile-remove /var/run/usbmount/.mount
exit
elif [ $ROOT_DEV = /$DEVNAME ]; then
log debug "skipping ROOT_DEV $ROOT_DEV mounted at /"
lockfile-remove /var/run/usbmount/.mount
exit
elif [ $BOOT_DEV = /$DEVNAME ]; then
log debug "skipping BOOT_DEV $BOOT_DEV mount as /boot"
lockfile-remove /var/run/usbmount/.mount
exit
fi
# Try to use specifications in /etc/fstab to skip.
if egrep -q "^[[:blank:]]*$DEVNAME" /etc/fstab; then
log debug "skipping /$DEVNAME exit"
lockfile-remove /var/run/usbmount/.mount
exit
elif grep -q "^[[:blank:]]*UUID=$UUID" /etc/fstab; then
log debug "skipping $UUID"
lockfile-remove /var/run/usbmount/.mount
exit
else
log debug "/$DEVNAME contains filesystem type $FSTYPE"
fstype=$FSTYPE
# Test if the filesystem type is in the list of filesystem
# types to mount.
if in_list "$fstype" "$FILESYSTEMS"; then
# Search an available mountpoint.
for v in $MOUNTPOINTS; do
if [ -d "$v" ] && ! grep -q "^[^ ][^ ]* *$v " /proc/mounts; then
mountpoint="$v"
log debug "mountpoint $mountpoint is available for /$DEVNAME"
break
fi
done
if [ -n "$mountpoint" ]; then
# Determine mount options.
options=
for v in $FS_MOUNTOPTIONS; do
if expr "$v" : "-fstype=$fstype,."; then
options="$(echo "$v" | sed 's/^[^,]*,//')"
break
fi
done
if [ -n "$MOUNTOPTIONS" ]; then
options="$MOUNTOPTIONS${options:+,$options}"
fi
# Mount the filesystem.
log info "executing command: mount -t$fstype ${options:+-o$options} $DEVNAME $mountpoint"
mount "-t$fstype" "${options:+-o$options}" "$DEVNAME" "$mountpoint"
# Determine vendor and model.
vendor=
if [ -r "/sys$DEVPATH/device/vendor" ]; then
vendor="`cat \"/sys$DEVPATH/device/vendor\"`"
elif [ -r "/sys$DEVPATH/../device/vendor" ]; then
vendor="`cat \"/sys$DEVPATH/../device/vendor\"`"
elif [ -r "/sys$DEVPATH/device/../manufacturer" ]; then
vendor="`cat \"/sys$DEVPATH/device/../manufacturer\"`"
elif [ -r "/sys$DEVPATH/../device/../manufacturer" ]; then
vendor="`cat \"/sys$DEVPATH/../device/../manufacturer\"`"
fi
vendor="$(echo "$vendor" | sed 's/^[[:blank:]]\+//; s/[[:blank:]]\+$//')"
model=
if [ -r "/sys$DEVPATH/device/model" ]; then
model="`cat \"/sys$DEVPATH/device/model\"`"
elif [ -r "/sys$DEVPATH/../device/model" ]; then
model="`cat \"/sys$DEVPATH/../device/model\"`"
elif [ -r "/sys$DEVPATH/device/../product" ]; then
model="`cat \"/sys$DEVPATH/device/../product\"`"
elif [ -r "/sys$DEVPATH/../device/../product" ]; then
model="`cat \"/sys$DEVPATH/../device/../product\"`"
fi
model="$(echo "$model" | sed 's/^[[:blank:]]\+//; s/[[:blank:]]\+$//')"
# Run hook scripts; ignore errors.
export UM_DEVICE="$DEVNAME"
export UM_MOUNTPOINT="$mountpoint"
export UM_FILESYSTEM="$fstype"
export UM_MOUNTOPTIONS="$options"
export UM_VENDOR="$vendor"
export UM_MODEL="$model"
log info "executing command: run-parts /etc/usbmount/mount.d"
run-parts /etc/usbmount/mount.d || :
else
# No suitable mount point found.
log warning "no mountpoint found for $DEVNAME"
exit 1
fi
fi
fi
elif [ "$1" = remove ]; then
# A block or partition device has been removed.
# Test if it is mounted.
while read device mountpoint fstype remainder; do
if [ "$DEVNAME" = "$device" ]; then
# If the mountpoint and filesystem type are maintained by
# this script, unmount the filesystem.
if in_list "$mountpoint" "$MOUNTPOINTS" &&
in_list "$fstype" "$FILESYSTEMS"; then
log info "executing command: umount -l $mountpoint"
umount -l "$mountpoint"
# Run hook scripts; ignore errors.
export UM_DEVICE="$DEVNAME"
export UM_MOUNTPOINT="$mountpoint"
export UM_FILESYSTEM="$fstype"
log info "executing command: run-parts /etc/usbmount/umount.d"
run-parts /etc/usbmount/umount.d || :
fi
break
fi
done < /proc/mounts
else
log err "unexpected: action '$1'"
exit 1
fi
log debug "usbmount execution finished"

View file

@ -0,0 +1,53 @@
# Configuration file for the usbmount package, which mounts removable
# storage devices when they are plugged in and unmounts them when they
# are removed.
# Change to zero to disable usbmount
ENABLED=1
# Mountpoints: These directories are eligible as mointpoints for
# removable storage devices. A newly plugged in device is mounted on
# the first directory in this list that exists and on which nothing is
# mounted yet.
MOUNTPOINTS="/media/usb0 /media/usb1 /media/usb2 /media/usb3
/media/usb4 /media/usb5 /media/usb6 /media/usb7"
# Filesystem types: removable storage devices are only mounted if they
# contain a filesystem type which is in this list.
FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus exfat fuseblk ntfs"
#############################################################################
# WARNING! #
# #
# The "sync" option may not be a good choice to use with flash drives, as #
# it forces a greater amount of writing operating on the drive. This makes #
# the writing speed considerably lower and also leads to a faster wear out #
# of the disk. #
# #
# If you omit it, don't forget to use the command "sync" to synchronize the #
# data on your disk before removing the drive or you may experience data #
# loss. #
# #
# It is highly recommended that you use the pumount command (as a regular #
# user) before unplugging the device. It makes calling the "sync" command #
# and mounting with the sync option unnecessary---this is similar to other #
# operating system's "safely disconnect the device" option. #
#############################################################################
# Mount options: Options passed to the mount command with the -o flag.
# See the warning above regarding removing "sync" from the options.
MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime"
# Filesystem type specific mount options: This variable contains a space
# separated list of strings, each which the form "-fstype=TYPE,OPTIONS".
#
# If a filesystem with a type listed here is mounted, the corresponding
# options are appended to those specificed in the MOUNTOPTIONS variable.
#
# For example, "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117" would add
# the options "gid=floppy,dmask=0007,fmask=0117" when a vfat filesystem
# is mounted.
FS_MOUNTOPTIONS=""
# If set to "yes", more information will be logged via the syslog
# facility.
VERBOSE=yes

Some files were not shown because too many files have changed in this diff Show more