Skip to content

Commit f8cbf5e

Browse files
committed
don't use PGID to do clean up
1 parent 15a2e0c commit f8cbf5e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Set Linux as router in one command. Able to provide Internet, or create WiFi hot
44

55
It wraps `iptables`, `dnsmasq` etc. stuff. Use in one command, restore in one command or by `control-c` (or even by closing terminal window).
66

7-
[More tools and projects 🛠️](https://garywill.github.io) | [🍻 Buy me a coffee ❤️](https://github.com/garywill/receiving/blob/master/receiving_methods.md)
7+
[📰 News & Developer Notes](https://github.com/garywill/linux-router/issues/28) | [More tools and projects 🛠️](https://garywill.github.io) | [🍻 Buy me a coffee ❤️](https://github.com/garywill/receiving/blob/master/receiving_methods.md)
88

99
## Features
1010

@@ -23,7 +23,7 @@ Basic features:
2323
- Create AP on the same interface you are getting Internet (usually require same channel)
2424
- Transparent proxy (redsocks)
2525
- Transparent DNS proxy (hijack port 53 packets)
26-
- Compatible with NetworkManager (automatically set interface as unmanaged)
26+
- Detect NetworkManager and make sure it won't interfere (handle interface (un)managed status)
2727
- You can run many instances, to create many different networks. Has instances managing feature.
2828

2929
**For many other features, see below [CLI usage](#cli-usage-and-other-features)**
@@ -388,11 +388,11 @@ Options:
388388

389389
## What changes are done to Linux system
390390

391-
On exit of a linux-router instance, script **will do cleanup**, i.e. undo most changes to system. Though, **some** changes will **not** be undone, which are:
391+
On exit of a linux-router instance, script **will do cleanup**, i.e. undo most changes to system. Though, **some** changes (if needed) will **not** be undone, which are:
392392

393393
1. `/proc/sys/net/ipv4/ip_forward = 1` and `/proc/sys/net/ipv6/conf/all/forwarding = 1`
394-
2. dnsmasq (if used) in Apparmor complain mode
395-
3. hostapd (if used) in Apparmor complain mode
394+
2. dnsmasq in Apparmor complain mode
395+
3. hostapd in Apparmor complain mode
396396
4. Kernel module `nf_nat_pptp` loaded
397397
5. The wifi device which is used to create hotspot is `rfkill unblock`ed
398398
6. WiFi country code, if user assigns
@@ -415,7 +415,7 @@ On exit of a linux-router instance, script **will do cleanup**, i.e. undo most c
415415

416416
<details>
417417

418-
- Compatibility with firewalld
418+
- Detect firewalld and make sure it won't interfere our interface
419419
- WPA3
420420
- Global IPv6
421421
- Explictly ban forwarding if not needed

lnxrouter

100755100644
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ _cleanup() {
11581158
}
11591159

11601160
clean_iptables() {
1161-
bash $CONFDIR/undo_iptables.sh
1161+
[[ -f $CONFDIR/undo_iptables.sh ]] && bash $CONFDIR/undo_iptables.sh
11621162

11631163
[[ -f $CONFDIR/undo_iptables_2.sh ]] && bash $CONFDIR/undo_iptables_2.sh
11641164
}
@@ -1173,10 +1173,10 @@ cleanup() {
11731173
clean_iptables > /dev/null
11741174
_cleanup 2> /dev/null
11751175

1176-
pgid=$(ps opgid= $$ |awk '{print $1}' )
1177-
echo "Killing PGID $pgid ..."
1178-
kill -15 -$pgid
1179-
sleep 1
1176+
#pgid=$(ps opgid= $$ |awk '{print $1}' )
1177+
#echo "Killing PGID $pgid ..."
1178+
#kill -15 -$pgid
1179+
#sleep 1
11801180
echo "Cleaning up done"
11811181
#kill -9 -$pgid
11821182
}

0 commit comments

Comments
 (0)