Commit Graph

108 Commits

Author SHA1 Message Date
68b53ccad1
implemented daemon
naxalnet is now a daemon! When run from systemd, it checks for new
devices or removal of devices and reloads the wifi configuration.
Updated the systemd service and changed Type to notify. Unfortunately,
there is some problem with logging. The messages from naxalnet.iwd could
not be found in the systemd journal or while running without --systemd.
2021-09-07 11:19:14 +05:30
6fff558405
many changes, see full commit message
- Renamed here_be_dragons() to main().
- Added daemon.py (doesn't do anything yet).
- Added GPL disclaimer to all python files and removed the shebang #!
  from all files.
- args is now defined outside any function in scripts.py
- Changed arguments of some functions in scripts.py
2021-09-06 21:54:24 +05:30
0bcd31b6e3
removed log.py 2021-09-06 15:00:34 +05:30
2d9aee4d3a
added --systemd and --verbose arguments
When run without --systemd, naxalnet will log to stderr.
Otherwise, it will log to systemd journal.

log.py is no longer needed.
2021-09-06 14:57:54 +05:30
a3e9b45050
more logging messages and code cleanup
Removed log messages from config.py
2021-09-06 12:23:07 +05:30
Pranav Jerry
33156e6a8d Merge pull request 'logging' (#16) from logging into master
Reviewed-on: https://git.disroot.org/pranav/naxalnet/pulls/16

See CHANGELOG and issue #13 for details
2021-09-05 08:33:32 +00:00
4d9de4d3c3
updated changelog again 2021-09-05 14:00:11 +05:30
97b1f46535
updated CHANGELOG and version in __init__.py
Ready for merge
2021-09-05 13:47:54 +05:30
ee341d6967
updated README.md
Made the requirements more clear
2021-09-04 20:00:00 +05:30
3774076e03
updated README
Added new dependency python-systemd
2021-09-04 18:37:30 +05:30
87c5d48144
added more logging info 2021-09-04 14:24:53 +05:30
e4a7fa5d3f
renamed systemd-networkd config files 2021-09-04 12:59:26 +05:30
4db6d9457f
improved README, more logging 2021-09-04 11:53:08 +05:30
4ea53e5a35
implemented logging
- New dependency -- python-systemd for logging to journal
- Changed service file to start after networkd
- New submodule which contains "logger" for use by all other submodules
- Removed bus argument from Device and Adapter classes
2021-08-25 15:52:46 +05:30
09ea47e609
fixed typo in README.md 2021-08-23 10:52:08 +05:30
d8dcf10b76
changed version in CHANGELOG.md
As usual, I screwed up at the right time.
2021-08-19 13:08:31 +05:30
feb362b149
Version 0.3.0
Let's assume I haven't forgotten anything.
2021-08-19 12:51:18 +05:30
1a6dbc4bcb
Merge branch 'args-and-config'
See CHANGELOG.md for details
2021-08-19 12:49:18 +05:30
9f8a5b3d0d
updated CHANGELOG and version
Ready for merge
2021-08-19 12:48:02 +05:30
fdbbca686d
removed license from package description
Fixed MANIFEST.in and changed data_files in setup.cfg
2021-08-19 12:36:40 +05:30
be8de69b73
updated README and Makefile
Added uninstall as dependency for purge in Makefile.
Changed pkexec and pkcon to sudo and apt and dnf
2021-08-19 12:03:20 +05:30
7e0fe5ef4c
many changes -- see full commit message
The config file is now installed as /etc/naxalnet/naxalnet.conf.example
by default.
make uninstall now does not ask for confirmation. Added rule purge in
Makefile.
Updated the README.
Changed order of stop commands in service file.
Updated setup.cfg and docstrings.
2021-08-18 17:33:46 +05:30
274f08cded
added install instructions for fedora and ubuntu
May not work, I have not tested it.
2021-08-18 15:34:07 +05:30
d1ec77dc69
clean up runtime files when stopped
This only applies to the systemd service
2021-08-17 09:49:16 +05:30
cf54edf9b9
updated README
Changed order of services to stop in section Stopping the service. This
is because while stopping naxalnet, the ExecStopPost line says to delete
two interfaces. But just before it is run, networkd is stopped. Running
the command will again start networkd, which is not what we need.
2021-08-16 21:32:57 +05:30
e99b3222e1
simplified systemd-networkd reload in naxalnet.service 2021-08-16 21:29:27 +05:30
d18160c46c
disabled buffering in python
Buffering makes the systemd journal not show the logs at the right time.
And changed the systemd service file so that the new batman and bridge
interfaces are deleted when naxalnet.service is stopped. Also simplified
the Stopping section in the README because of this change.
2021-08-16 18:56:17 +05:30
397269823d
almost ready for merge
* Improved CHANGELOG, README, HACKING
* Added naxalnet.conf containing default values. This will be installed
along with the package.
2021-08-15 15:02:28 +05:30
d7a9edc1e8
many changes -- read full commit
* Improved docstrings, README
* Added argument --version and its implementation
* Added "uninstall" rule to Makefile and added it in the README
* Updated CHANGELOG
* Cleaned up code

I've probably forgot something so we can't merge to master yet.
And we still have to add installation instructions for ubuntu and fedora
2021-08-14 22:00:07 +05:30
fe146b7a0d
added implementation of --print-wifi
And added it to the README.
Cleaned up the docstring in naxalnet/__main__.py
2021-08-13 12:30:30 +05:30
b50d0e3656
made README and HACKING.md more readable 2021-08-13 11:32:42 +05:30
550529e3d0
updated CHANGELOG
I forgot to update it in the previous commit
2021-08-13 10:48:58 +05:30
dfd521f9b9
added new args and support for conf files
Tidied up code, added more documentation, and the version now confirms
to some PEP standard. Because of the way configuration and arguments are
implemented, ALL the keys in configuration files should have an argument
that can change its value.

Verbose option was commented out, since it is not implemented. An
argument --print-wifi, which should print out WiFi ssid and password is
not implemented at the moment. Also, the README should be updated to
show the new changes. By the way I just remembered I didn't update the
CHANGELOG; I'll do it in the next commit. 😁
2021-08-13 10:35:13 +05:30
90464f0304
made how it works section more legible in README.md 2021-08-10 13:20:27 +05:30
e24ff03e0c
Updated how it works section in README.md 2021-08-09 21:46:10 +05:30
2f97bab5cf
changed README.md
Changed the section on internet shutdowns.
Let's see if anyone actually reads the README in source form.
2021-08-09 20:06:57 +05:30
a798ac8051
improved README.md
And added a new argument (not implemented) in scripts.py
2021-08-09 12:54:41 +05:30
fb4b11b9fd
added link to internetshutdowns.in in README.md 2021-08-08 22:20:05 +05:30
ebc7e39d76
added CHANGELOG.md
Contributors should update this file everytime they create a commit
2021-08-05 14:45:24 +05:30
2e4149d943
moved device setup into a single function
By the way, --verbose is not implemented yet. We will need to wait until
systemd journal or some other form of logging is implemented.
2021-08-05 12:11:31 +05:30
df73f94018
Added alt text to some links in README.md
And removed a sentence in manual installation section
2021-08-02 18:26:14 +05:30
3d63ddd2d2
Fixed typo in README.md
Forgot a space after comma
2021-08-02 18:13:32 +05:30
5db3d1dc09
added new section in HACKING.md 2021-08-02 16:05:24 +05:30
f55fc74ad4
added PYTHON variable in Makefile
This should be used if the python executable is not python3 in your
distro.

I would like to express my displeasure to the Government of India for
not including me in the list of targets for Pegasus, even though I'm
convinced I am a threat to the sovereignty and integrity of the nation
2021-08-01 16:58:48 +05:30
16dff8bb49
added support for arguments
Try naxalnet --help to see help
2021-07-30 17:56:33 +05:30
946d20a72c
Fixed typo and improved README (again) 2021-07-29 22:44:01 +05:30
7b7ce8044b
improved README
Let's see if anyone reads the comments :)
Changed python to python3 in Makefile
2021-07-29 22:36:53 +05:30
f6a5a8556b
fixed version number in __init__.py 2021-07-26 16:47:36 +05:30
5068250ad6
added link to HACKING.md in README.md 2021-07-26 16:08:36 +05:30
19137faab3
reduced 5s delay in the systemd service to 2s 2021-07-26 15:58:50 +05:30