Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - sandro87

#1
Nevermind, the 50-myscript.start worked!  :D
#2
Quote from: franco on September 12, 2018, 03:06:14 PM
Take a look at these docs:

https://docs.opnsense.org/development/backend/autorun.html
https://docs.opnsense.org/development/backend/configd.html


Cheers,
Franco

Hello,
thanks! The first solution looks like the one I'm looking for.
Just two things:
1) the docs show a directory system like "/usr/local/etc/rc.syshook.d/early/50-yourscript"
On my build I don't have any subdirectory, just files like 20-freebsd.start . Is it because I'm using and old version (18.1)?
2) I tried both version anyway and nothing seems to work, maybe I'm missing something. Is there a way to debug this?

My script is a simple test like this

#!/bin/bash

touch /home/hotspotuser/testfile


I don't see why it shouldn't work
#3
Hello,
I'm trying to add custom commands at boot (this is not a service or daemon!) to run at every boot, it just needs to cd to a directory and rename a file. nothing else.
I tried to follow the freeBSD documentation which says to put the .sh file containing the command in /usr/local/etc/rc.d/ which is completey ignored it seems, even if I enable rc_debug it logs nothing.
If I change the crontab using @reboot it's deleted by opnsense at every boot.

What should I do?
#4
Hello,
I'm trying to find a definite way to show a landing page for various hotels after the customer logs in. On iOS the problem is not present, once you're connected the captive portal pop up opens up and after you login if you have a redirect page it will you show up until you manually close it, inside the popup.
On Android after you login the device checks immediately for internet connection at one of their domains and if that succedes the pop up will automatically close. To complicate things more it really depends on the ROM used, some keep it open some don't. Has anyone found a OS-wide way for this? I found this workaround https://stackoverflow.com/questions/34933146/prevent-captive-portal-auto-close-after-authentication-android# but I'm sure I get it and if that proxy thing can be done on OPNsense...