Open gleep52 opened 4 years ago
If you're comfortable with Xcode, you could clone the master
branch locally and change the bundle identifier, then build it and that'd allow you to have two separate copies of PiBar with two separate configurations. By default, the configuration is stored in UserDefaults under the bundle identifier, so that's why you're having the issue with one config 'overwriting' the other.
Switching between different configurations sounds like a nifty feature for PiBar, but so much of an edge-case and fairly complicated to implement that I can't promise it'll happen any time soon or ever.
Oh, it might be something you've already considered and are unable to do, but you could also consider changing the pi-holes all to the same hostname / port / passwords so that the same config will work for you in both environments. That'd be pretty seamless and nice. I'd bet there is some way to remap hostnames and ports locally on your machine if you can't actually change your work pi-holes.
Possibly a dns lookup change - but I can't get it to work without specifically using the hostname for some reason (using IP doens't let me test/save it). The API keys will be different though, so I'm not sure that would work either?
I was hoping for the environment/profile toggle because I've setup pi-holes for friends and lots of family too - so I could easily change their pihole when I'm visiting, etc... I understand the complexity I'm requesting - but I'm sure there are more people than just myself who use pi-hole in more than one location. Once you pi-hole - you don't stop. Right? :)
If you're comfortable with Xcode, you could clone the
master
branch locally and change the bundle identifier, then build it and that'd allow you to have two separate copies of PiBar with two separate configurations.
I'm not real great with xcode - hardly touched it to be honest - but if I did this, then my auto updates from the app store won't update both I'm guessing.
The API keys will be different though, so I'm not sure that would work either?
My understanding is that the API key is just a simple hash of your Pi-hole's password, so I'd think if you set them to the same password you'll end up with the same API key.
I'm not real great with xcode - hardly touched it to be honest - but if I did this, then my auto updates from the app store won't update both I'm guessing.
Yeah, that's true, but updates so far have been few and far between (I haven't been programming in my free time a lot lately, though I have been very slowly working on the iOS version of PiBar). But this'd be simple for you to do, no Xcode skills required.
I understand the complexity I'm requesting - but I'm sure there are more people than just myself who use pi-hole in more than one location.
We'll see what happens, maybe I'll do this some day! There's a lot of different Pi-hole apps out there, so maybe I'll be forced to implement it just to further designate PiBar as the "ultimate" Pi-hole companion app.
I have two pi-holes at home, and I have two pi-holes at work. If I add them all to my one instance of PiBar, then I cannot pause or control them simultaneously. So I copied the app and I can get two to run but as soon as I close the app, the last one that was saved is still used - so it looks like there must be a config file that is shared and I cannot have two environments. Is there a way to have different environments or profiles so to speak so that I can setup my two for home under one profile/environment and then setup my two work pi-holes in a different profile/environment. Super props if detecting the pi-holes on startup (via pingable name, online status, or perhaps network subnet detecting) and switching to that profile! Any chance that can be done?