Jump to content

dlandon

Community Developer
  • Posts

    10,232
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by dlandon

  1. It's nothing big but this is what I was talking about. And by adding a 16x16 icon png fixes it. Ok. Now I get it. Not a problem to fix that.
  2. Sorry. I really meant this for dmacias. I don't see the issues you are talking about with the apcupsd plugin.
  3. Is this my apcupsd plugin you are talking about? Here: http://lime-technology.com/forum/index.php?topic=34994.0
  4. You also need an icons directory with a 16x16 image in lowercase matching the Tittle. So for apcupsd your title is APC UPS so I resized the 48x48 png and renamed it apcups.png and put it in an icons directory in emhttp/plugins/apcupsd. For one of my own plugins I had to move the main 48x48 png to an images folder for it to show up in the installed plugins section. I don't understand this. It is not necessary for apcupsd. I modified apcupsd so the php is included in the .page file and the image is fine in the plugins section. I know. I'm not sure why my plugin's image didn't show up there. I was just pointing it out that it could go in an images directory and it would. But my main point was if you don't have an 16x16 icon then there is a default icon in settings to the left of the Title instead of the apcupsd.png. It has to be apcups.png in the icons directory to match the Title. It's actually not the title, but the name of the plugin. In the case of apcupsd, the name is 'apcupsd' so the icon needs to be 'apcupsd.png' for the plugin manager. <!DOCTYPE PLUGIN [ <!ENTITY name "apcupsd"> <---- this one <!ENTITY author "seeDrs/dlandon"> <!ENTITY version "2014.11.30"> <!ENTITY pluginURL "https://github.com/dlandon/unraid-snap/raw/master/Apcupsd-x86_64.plg"> <!ENTITY pkgversion "3.14.12"> ]> <PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;"> The application icon is specified in the 'apcupsd.page' file. Menu="OtherSettings" Icon="apcupsd.png" <------ application icon Version="2014.11.30" Author="seeDrs/dlandon" Title="APC UPS" --- <?PHP In this case the icons are both the same, but could be different if desired.
  5. You also need an icons directory with a 16x16 image in lowercase matching the Tittle. So for apcupsd your title is APC UPS so I resized the 48x48 png and renamed it apcups.png and put it in an icons directory in emhttp/plugins/apcupsd. For one of my own plugins I had to move the main 48x48 png to an images folder for it to show up in the installed plugins section. I don't understand this. It is not necessary for apcupsd. I modified apcupsd so the php is included in the .page file and the image is fine in the plugins section.
  6. There is a change in v6b12 that will affect plugins. The emhttp file structure has changed and you can no longer have a .page and a .php file. unRAID expects the php for your page to be included in the .page file of your plugin. The OP has more details. EDIT: I have found a work around. I have posted in the OP.
  7. After the plugin is removed, you leave a lot of downloaded Slackware packages behind. I'm not sure that is a good idea.
  8. The answer turned out to be much easier that I thought. I loaded the plugin on my test server. Here is the change you need to make: <PLUGIN name="&displayName;" author="&author;" version="&plgVersion;" category="&category;" pluginURL="&pluginURL;"> Change to this: <PLUGIN name="&name;" author="&author;" version="&plgVersion;" category="&category;" pluginURL="&pluginURL;"> And it works.
  9. As a start I think these: INSTALLDIR="/usr/local/&name;" CONFIGDIR="/usr/local/&name;/config" Should be: INSTALLDIR="/usr/local/emhttp:/plugins/&name;" CONFIGDIR="/usr/local/emhttp/plugins/&name;/config" The plugins are installed in: /usr/local/emhttp/plugins/ EDIT: I also see an issue here: <!-- Create menu under settings tab --> <FILE Name="/usr/local/emhttp/plugins/webGui/&author;.page"> <INLINE> Author="&authorName;" Version="1.0" Title="&author; Plugins" Menu="Settings" Type="menu" </INLINE> </FILE> Change to: <!-- Create menu under settings tab --> <FILE Name="/usr/local/emhttp/plugins/&name;/&name;.page"> <INLINE> Author="&authorName;" Version="1.0" Title="&author; Plugins" Menu="Settings" Type="menu" </INLINE> </FILE>
  10. I'm having a problem with the 'echo' text I'm trying to display in the progressFrame. The text is showing up, but is only half visible. Half of the text line is behind the footer. I am using update.htm for the progressFrame. Is there an adjustment I need to make in my HTML body to leave room for the progressFrame?
  11. Yes, I get what you meant. What I was meaning is that within the 'plugin' script, the general methodology looks to be that a check method is used to perform a check of the local version against remote version, the update method is used to download the later version to tmp and then subsequently calls the install method to perform the install (again). So if you build your install method to ensure it tears down the areas you need refreshing, then calling the update method will perform an installation, creating new versions of the files where required. You can also call multiple methods, allowing the same bash script to be used across more than one method; <!-- The 'install' script. --> <FILE Name="/tmp/plugins/tmp" Run="/bin/bash" Method="install update" Type="text"> <INLINE> if [ ! -d /tmp/plugins/builtin/&name; ]; then mkdir -p /tmp/plugins/builtin mv /usr/local/emhttp/plugins/&name; /tmp/plugins/builtin else rm -r /usr/local/emhttp/plugins/&name; fi tar -xf /boot/config/plugins/&name;/&name;-&version;.tar.gz -C /usr/local/emhttp/plugins mv /usr/local/emhttp/plugins/&name;-&version; /usr/local/emhttp/plugins/&name; </INLINE> </FILE> So 'method="update"' works? I couldn't get it to work.
  12. No. This is what I am talking about: <!-- The 'update' script. --> <FILE Run="/bin/bash" Method="update"> <INLINE> rm -f -r /usr/local/emhttp/plugins/&name; </INLINE> </FILE>
  13. I have figured out how to do this, but I wonder if an 'update' method would be appropriate.
  14. When I am updating a plugin I want to remove the /usr/local/emhttp/plugin/ directory for my plugin before the update is applied so any changes in the files will be written. What is the best way to do that?
  15. It's leftover from a previous install of older openvpnserver plugin. This is on a test server that I loaded the openvpnclient as a test. My other server has never had that installed and it also has it. After a clean re-boot - no plugins? How do I get rid of it? EDIT: After a safe mode boot: total 4 -rw-r--r-- 1 root root 1 Aug 31 19:33 openvpnserver lrwxrwxrwx 1 root root 49 Aug 31 19:33 unRAID-OS -> /usr/local/emhttp/plugins/unRAID-OS/unRAID-OS.plg In the ram image? Both files are dated the same day and time. 6b8 was released 8/31.
  16. After I boot up unRAID with no plugins I see this in /var/log/plugins: total 4 -rw-r--r-- 1 root root 1 Aug 31 19:33 openvpnserver lrwxrwxrwx 1 root root 49 Aug 31 19:33 unRAID-OS -> /usr/local/emhttp/plugins/unRAID-OS/unRAID-OS.plg What is the openvpnserver file? Is this correct? It is not a symlink.
  17. A couple of suggestions: Based on a post by Tom: /usr/local/emhttp/plugins/ssh/Ssh.page # page file for webGui menu system /usr/local/emhttp/plugins/ssh/Ssh.php # webGui page code It seems that the page file and the php have to both be exactly the same name. I think his idea here is to insure the icons are in alphabetic order in the settings page. Also the versioning standard seems to be year.month.day for plugins.
  18. UnRaid has a problem with certain names. Had the same issue with apcupsd. Use name; variable for all references to the plugin name rather than hard coding to make this easier to change.
  19. In the example I gave in the OP, the icon is expected to be: /usr/local/emhttp/plugins/ntfs-3g/ntfs-3g.png Be sure your .png is named this way. The line: <!ENTITY pluginURL "https://github.com/dlandon/unraid-snap/raw/master/ntfs-3g-x86_64.plg"> is used to check for a new plugin version. In a telnet session, verify you can do a wget on this url without any errors. I also had a situation where the name I was using in one plugin was not accepted by plgman. When I changed the name, it worked properly. Does your README.me content show up on the plugin page?
  20. My OP was asking how the plugin manager worked on V6. After a week of working with several of my plugins, I have learned a lot (geez, that hurts the brain) and I have modified my OP to document what I know at this time. I'm not sure how complete my write up is, but it should help those of you wanting to convert V5 plugins, or author a new plugin for V6. Let me know if there is anything that is incorrect or incomplete. I will do my best to keep the OP up to date. Tom or Jonp, please comment if I have gotten anything incorrect or incomplete.
  21. I would take a look at the dockerMan plugin. It's nicely written. A few things I've learned: - The 'name' you assign to the plugin has a lot of importance. The name should be the sub-directory off the /usr/local/emhttp/plugins path. - Your icon should be named the same with a .png extension in that same sub-directory. - A READ.me file in the same sub-directory will be displayed on the plgman page. - Be sure to include a script with 'remove' method so your plugin can clean up all that is necessary when plgman removes your plugin. Remove packages, delete files from the flash drive, etc. If you'd like, pm me and I'd be happy to review your plugin and give you some ideas. By no means am I an expert, but the last week has been a steep learning curve for me and I have learned a lot about plugins. I have to say it is a pretty slick system. There seems to be one small issue with updating a plugin - it doesn't load on the next boot.
  22. Are you saying that part of installation of the script starts a background process? Yes. Hmm probably the process is still owned by the process running the 'plugin install' and so the latter process won't exit. Instead of task & try nohup task & Solved by using the 'at' command to schedule the script to run. The rc.snap start calls a script that puts an inotify script in the background. <!-- Snap start up script. --> <FILE Name="/tmp/start_snap.sh"> <INLINE> <![CDATA[ #!/bin/bash /etc/rc.d/rc.snap start rm /tmp/start_snap.sh ]]> </INLINE> </FILE> <!-- Snap install. --> <FILE Name="/tmp/SnapInstall.sh" Run="/bin/bash"> <INLINE> <![CDATA[ #!/bin/bash # # Start SNAP and mount any SNAP (usb) drives found. # echo "Starting Snap..." at -f/tmp/start_snap.sh now echo "Snap installation complete..." rm /tmp/SnapInstall.sh ]]> </INLINE> </FILE>
×
×
  • Create New...