Jump to content

dlandon

Community Developer
  • Posts

    10,251
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by dlandon

  1. After the plugin is removed, you leave a lot of downloaded Slackware packages behind. I'm not sure that is a good idea.
  2. 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.
  3. 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>
  4. 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?
  5. 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.
  6. 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>
  7. I have figured out how to do this, but I wonder if an 'update' method would be appropriate.
  8. 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?
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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?
  14. 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.
  15. 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.
  16. 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>
  17. Are you saying that part of installation of the script starts a background process? Yes.
  18. I'm having an issue with SNAP plugin installation through the Extensions install. The plugin installs correctly and I echo one last message that snap is installed, but it never exits the plugin installation. The 'Close' button doesn't show up. I am running a background task in snap (inotify) and when I comment that out of the script, the 'Close' button shows up. Something is hanging the plugin installation. I am running the task in the background like this: task & Maybe there is more I need to do.
  19. Ok. Thanks, quite straight forward. I've installed the plugins from the 'Extensions' page, but when I update a plugin, the /boot/config/plugins/ntfs-3g-x86_64.plg gets erased and a plugsntfs-3g-x86.plg is created in the /boot/config directory, but on a re-boot the plugin does not load.
  20. I'm working on some documentation and guidelines for Plugin Developers which will show up in a wiki on limetech github. For now: for unRaid 6, do not manually place plugin files directly into /boot/config/plugins. The proper way to install a plugin is to do via the Extension page under Install extension. Please attach your plg file and let me take a look. I added .plg in the list of attachable files for the forum. Attached. I'd also like to know how to add the description to the plugins page. ntfs-3g-x86_64.plg
  21. This is pretty exciting stuff. Updates will be easier and less prone to operator error. Anything that can cut down on operator mistakes will make for a lot less support and a happier user. Great work LT!
×
×
  • Create New...