Jump to content

Can Captive portal (Evil portal) use files from SD card?


lxx
 Share

Recommended Posts

Captive portal (Evil portal 2) is up and running. Because of the limited internal space, I want to use the sd card to store the pictures for the background and the buttons..

Now i shows:

$imagesdir/wifidog.png

But I want the images to be loaded from the sd card

/sd/html/$imagesdir/

the folder in /sd/html is just called images

Link to comment
Share on other sites

Captive portal (Evil portal 2) is up and running. Because of the limited internal space, I want to use the sd card to store the pictures for the background and the buttons..

Now i shows:

$imagesdir/wifidog.png

But I want the images to be loaded from the sd card

/sd/html/$imagesdir/

the folder in /sd/html is just called images

Totally possible! You can create a symbolic link to you images on to that folder so: ln -s /sd/myimage.jpg /etc/nodogsplash/htdocs/images/

I think there is also a way to change the value of $imagesdir in the nodogsplash configuration which you can access through the configuration tab or in /etc/nodogsplash/nodogsplash.conf

Link to comment
Share on other sites

@newbi3,

Thank for the reply.

Unfortunately nodogslash configuration file does not include the "image" part, so I can't change the &imagedir path :(.

Where should I put the "ln -s /sd/myimage.jpg /etc/nodogsplash/htdocs/images/", so that I can still view the files from the sd.

Tnx, your the best :)

Link to comment
Share on other sites

"ln" is a command that creates links. The "-s" switch says this is a symbolic link and not a hard link which is what we want in this case. "/sd/myimage.jpg" would be the image or folder containing images or whatever other file you are going to create a link for. "/etc/nodogsplash/htdocs/images/" is the path to create the link in.

So the syntax is this:

ln -s <source_file> <destination>

You would run this from the command line

Link to comment
Share on other sites

Tnx,

It works :), your the best :d

I'll try (on my own ....lol) to figure out how to make this line automatic, so when I reset the MKV, it will be like the same as you explained. If it doesn't work I will let you know. I'm new to linux (terminal) , but with my friend google I hope to succeed.

Link to comment
Share on other sites

It works

I made the following schript en placed it in /etc/init.d/

#!/bin/bash


# This script will put symbol links from sd card to /etc/nodogsplash/htdocs folder


ln -s /sd/ /etc/nodogsplash/htdocs/images/

I called the file imgfromsd and made the imgfromsd file executable. Don't know if this is the correct way, but it works ;).

Link to comment
Share on other sites

Also I recommend against linking everything in /sd to that the images folder. You should make a folder in /sd and link only that folder.

ln -s /sd/sd_images /etc/nodogsplash/htdocs/images

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...