davesteele / comitup

Bootstrap Wifi support over Wifi
https://davesteele.github.io/comitup/
GNU General Public License v2.0
322 stars 54 forks source link

Can't change SSID of AP... #207

Closed GrandChriss closed 2 years ago

GrandChriss commented 2 years ago

Hello,

My problem is, that I changing app_name in /etc/comitup.conf file, but AP name still is comitup-xx. I tried to reinstall Comitup, but nothing works, maybe this functions is not available any more?

davesteele commented 2 years ago

Be sure that the variable you are changing in /etc/comitup.conf is "ap_name" - that's "ap", as in "access point".

GrandChriss commented 2 years ago
commitup-conf

That's how looking my config file. 3 n's, but after reboot it showing "comitup-24" (2 n's)... I was also trying to change "ap_name: Nothing" and it still showing as "comitup-24" after reboot. Maybe there is more I can show you to detect this problem? Also, I have a question about HTML page editting, is it possible when comitup already installed in Pi? Where I can find Web interface files?

I'm using: Raspberry Pi Zero W + Debian Buster Raspbian OS Desktop

GrandChriss commented 2 years ago

I solved that problem. Changed ap_name in /usr/share/comitup/comitup/comitup.py file.

I have another question, where I can find command when after reboot checking Wi-Fi and if it's connected it kill's comitup hotspot and web interface? I need to add some command there. Is it possible?

Thank you for this project! It really helps me

davesteele commented 2 years ago

If you have a single WiFi interface, the hotspot and web service will automatically be killed once connected upstream.

If there is something else you need to do, see _externalcallback in "man 5 comitup-conf".

davesteele commented 2 years ago

Just saw your screen shot. The variable definition is commented out (to show the default). Remove the leading "# ".

GrandChriss commented 2 years ago

I mean, maybe there's possibility to check wifi connection and start command if connected?

davesteele commented 2 years ago

Yes, look up _externalcallback.

GrandChriss commented 2 years ago

Maybe you can make a example for me? I tried to get external_callback in txt file, but after reboot file is empty. How to use it correctly? I need to start bash script when wifi Connected.

Thank you so much

davesteele commented 2 years ago

Something like:

# cat /usr/local/bin/comitup-callback
#!/bin/bash

if  [[ "$1" == "CONNECTED" ]] ; then
    ...
fi

# chmod 755 /usr/local/bin/comitup-callback
GrandChriss commented 2 years ago
comit sh conf logfile priv

I'm getting callback to logfile.txt, but second bash file don't start. When I execute mm.sh it start's normally. What can be the problem?

Thank you!

davesteele commented 2 years ago

Comitup will attempt to drop permissions to that of the script user and group. Make sure that is enough.

Don't assume that the script has a useful associated working directory.

GrandChriss commented 2 years ago

So what I should do? How launch bash script after callback CONNECTED?

newbash

Tried this also, nothing happening... Why commands not working?

davesteele commented 2 years ago

I don't have any other guidance here.