Commit Graph

18 Commits

Author SHA1 Message Date
D. Berge
db97382758 Add scripts to automatically update the LAN DNS records.
./sbin/update-dns.sh may be called at regular intervals (one hour
or so) via crontab.

It will automatically detect:
- its local host name (*.lan.dougal.aaltronav.eu); and
- which IP has internet access, if any.

Armed with that information and with the dynamic DNS API password
stored in DYNDNS_PASSWD in ~/.dougalrc, it will update the relevant
DNS record.

For this to work, the first `lan.dougal` hostname in the Nginx
configuration must be the one that is set up for dynamic update.
Other `lan.dougal` hostnames should be CNAME records pointing to
the first one.
2025-08-09 18:37:15 +02:00
D. Berge
9ad17de4cb Merge branch '76-add-configuration-gui' into 'devel'
Resolve "Add configuration GUI"

Closes #294, #295, #296, #298, #76, #297, #129, #313, #312, #305, #264, #307, #303, #300, #301, #302, #290, #291, #292, and #293

See merge request wgp/dougal/software!17
2025-07-09 18:11:50 +00:00
D. Berge
3189a06d75 Change tcpdump flags to capture on any interface 2025-06-27 00:05:23 +02:00
D. Berge
73fb7a5053 Make script executable 2024-05-05 19:35:19 +02:00
D. Berge
c7270febfc Add project configurations upgrade script.
This script rewrites project configurations to take into account
various structural changes in the configuration object.

The script can be run without arguments, in which case it will
upgrade the configuration of every project found in the local
database, or one or more project IDs can be given as command
line arguments in order to upgrade only those projects.

Configurations that have already been upgraded will not be
touched.

For other projects, both the original and new configurations will
be saved to file in the current directory, as well as two scripts:
one commits the new configuration to the server, and the other
restores the original one.

This script connects directly to the database, using the same
mechanisms as the Dougal server. It is recommended to run it
locally on the server host.

The restore scripts use the HTTP API, which they expect to find
on http://localhost:3000/api, so it is also recommended to run
them in the local server.

Closes #290.
Closes #291.
Closes #292.
Closes #293.
Closes #294.
Closes #295.
Closes #296.
Closes #297.
Closes #298.
2024-05-01 10:40:04 +02:00
D. Berge
daddd1f0e8 Add script to rewrite packet captures IP and MAC addresses.
Closes #230.
2023-09-29 15:58:59 +02:00
D. Berge
17f20535cb Cope with fragmented UDP packets.
Fixes #275.

Use this as the systemd unit file to run as a service:

[Unit]
Description=Dougal Network Packet Capture
After=network.target remote-fs.target nss-lookup.target

[Service]
ExecStart=/srv/dougal/software/sbin/packet-capture.sh
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=always
User=root
Group=users
Environment=PATH=/usr/bin:/usr/sbin:/usr/local/bin
Environment=INS_HOST=172.31.10.254
WorkingDirectory=/srv/dougal/software/var/
SyslogIdentifier=dougal.pcap

[Install]
WantedBy=multi-user.target
2023-09-29 15:28:11 +02:00
D. Berge
d5aac5e84d Add network packet capture script.
The idea is to capture incoming real-time data to be able to
replay it later on development systems, e.g., for new development
or troubleshooting.

Issue #230.
2022-05-14 11:57:09 +02:00
D. Berge
ca41bd8132 Do not lose data during database upgrades.
The database upgrade script is updated to export
also user-entered data stored in columns of tables
containing also derived data, and to re-import
everything after the upgrade.
2020-09-27 19:36:28 +02:00
D. Berge
60ffff15bf Disconnect DB sessions before starting upgrade 2020-09-23 18:18:39 +02:00
D. Berge
d45e17fce3 Add scripts to launch Dougal services in production 2020-09-13 15:35:36 +02:00
D. Berge
c7cee0b822 Associate correct schema when recreating a survey 2020-09-02 18:58:50 +02:00
D. Berge
fb947dcf9f Run exports before database upgrade 2020-09-02 18:58:24 +02:00
D. Berge
19c0562888 Ensure we don't try to connect to a non-existing database 2020-09-02 16:52:33 +02:00
D. Berge
ffd021a23e Ensure we're not using the database we're about to drop 2020-09-02 16:39:49 +02:00
D. Berge
faf1a0d83f Add database upgrade scripts (WIP) 2020-09-02 15:05:43 +02:00
D. Berge
f2373a0454 Use environment variables for DB connection if possible 2020-08-12 18:18:47 +02:00
D. Berge
d4f91aea3b Add script to update template schema from database 2020-08-12 14:23:34 +02:00