Jump to content

dmacias

Community Developer
  • Posts

    2,803
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by dmacias

  1. Thanks I'll use the numbered parent method. I was confused about the sorting but I figured it out. I had a page with a misplaced </div> and it would always go to the end of the tabs.
  2. Do you happen to know if you have have multiple page files like the plugin tab, if you can sort them? I know the main page file is first but the others seem random. I'm more interested in sorting when you have Tabs="true" in the page file under dynamix and the multiple pages as tabs. Also some of the php functions have changed like exec.php and the config write one.
  3. No there are no 9p pci drivers written for windows
  4. I assume you rebooted your vm or umounted and mounted. Maybe those 9p errors mean something. I read something about 9p net and initrmfs and adding virtio modules. For me I never even tested speed. 9p was about reliability. Coming from xen and rocket rides and cifs mounting.
  5. Try adding msize=262144 to your fstab line. It doubled it for me to 30 MB/s. I was copying a large file from downloads (my cache drive) in my vm to /tmp.
  6. Thought I'd chime in with a better way to work around this issue. In your fstab, add _netdev to your options. This will force the VirtFS mounting (even with auto) to wait until the network resources are available, which just so happens to solve the issue where sometimes the automounting would fail. We do this with our OpenELEC unVM and it works perfect. Where was this info 3 months ago When would that share be mounted in the boot process? Another problem I would see is that apps like sickbeard would be loaded before the drive mounted. It was another reason for rc.local mount with S98 and apps with S99. I've started and stopped the vm dozens of times and never had a failure this way. I'm willing to try out the auto mount again but before with default S20 for apps things wouldn't always work.
  7. Even if they did they'd probably be the same. Much like usb flash drives. Only other thing I can think of is adding two separate hubs. One for each flirc. I don't know if that would help identify them from each other.
  8. I don't know if this could work. But I was looking at assigning usb with udev rules. Give each usb device a unique name based on serial number. Then you could look up device id from that? and insert into vm xm. I'd be willing to try this if you have anything you want me to test. John I don't have anything but was reading about it. One example I saw was for multiple ftdi serial usb. At the bottom of this page http://stackoverflow.com/questions/9183880/how-to-find-out-which-usb-rs232-device-is-on-which-tty if you could get this to work. Then maybe. I only have 2 external usb and my front usb2 to 3 cable doesn't work with this mobo. But if add rear ports or a hub I have I'll test.
  9. I don't know if this could work. But I was looking at assigning usb with udev rules. Give each usb device a unique name based on serial number. Then you could look up device id from that? and insert into vm xm.
  10. Are you stuck on using flirc or could you use one flirc and multiple rc6 ir receivers from different vendors?
  11. I noticed one thing is you can remove the check for internet. Users should be installing this using a url in the plugins page. So if it gets installed once they don't need internet to install it again. Disregard my caps answer before too. They do matter for emhttp but not for command line. Also maybe you could explain how you decided to handle package removal. I'll look at the code later. Edit. Looks good. Once you do one the others should go quicker.
  12. It's looking for a .page file in /usr/local/emhttp I tried symlinking to the plugin page file but it just brings up the text cause it doesn't know what to do with .page. Also I made a file in /usr/local/emhttp/virtMan.page and added some html code but no luck. I'll have to look through the plgman code again and see if there's an error.
  13. Lol, even my spelling mistakes "Check is program is running to get extra information" Lol I misunderstood your post before. I thought you meant under the settings. I don't think there is any thing you can do for that link in plugins page
  14. I don't think caps matter. I ran into that when I changed virtman to virtMan. Here is what my virtMan.page file looks like. Some of it may look familiar . Icon="virtMan.png" Menu="OtherSettings" Title="virtMan" --- <?php include '/usr/local/emhttp/plugins/virtMan/virtMan.css';?> <?PHP # ------------------------------------------------------------------------- ## Load current config file and check if program is installed already # ------------------------------------------------------------------------- $virtMan_cfgfile = "/boot/config/plugins/virtMan/virtMan.cfg"; # This will clean any ^M characters caused by windows from the config file before use if (file_exists("$virtMan_cfgfile")) shell_exec("sed -i 's!\r!!g' '$virtMan_cfgfile'"); $virtMan_cfg = parse_ini_file( "$virtMan_cfgfile" ); # ------------------------------------------------------------------------- ## Check is program is running to get extra information # ------------------------------------------------------------------------- # Service Status Variable if (isset($virtMan_cfg['SERVICE']) && ($virtMan_cfg['SERVICE'] == "enable" || $virtMan_cfg['SERVICE'] == "disable")) $virtMan_service = $virtMan_cfg['SERVICE']; else $virtMan_service = "enable"; $virtMan_running = trim ( shell_exec ( "[ -f /proc/`cat /var/run/libvirt/libvirtd.pid 2> /dev/null`/exe ] && echo 'yes' || echo 'no' 2> /dev/null" ) ); # Check if virtMan.img exists if (file_exists( "/boot/config/plugins/virtMan/virtMan.img" )) { $virtMan_filecheck = "yes"; } else { $virtMan_filecheck = "no"; } # if virtMan.img exists check if mounted then mount if not if ($virtMan_filecheck == "yes") { if (shell_exec ( "mount | grep virtMan.img" ) == "") { shell_exec ( "mount -t ext4 /boot/config/plugins/virtMan/virtMan.img /etc/libvirt" ); } } # Get free space left on virtMan.img $virtMan_storagesize = number_format ( disk_free_space ( "/etc/libvirt" ) /1048576 , 1 ); # Get current installed version of the program $virtMan_curversion = trim ( shell_exec ( "virsh --version" ) ); if ($virtMan_curversion == "") $virtMan_curversion = "couldn't determine the libvirt version"; ?> <div style="width: 49%; float:left"> <div id="title"> <span class="left">Status:&#32; <?if ($virtMan_running=="yes"):?> <span class="green"><b>RUNNING</b></span> <span style="font-size:12px;"> with libvirt version: <b><?=$virtMan_curversion?></b></span> <?else:?> <span class="red"><b>STOPPED</b></span> <?endif;?> </span> </div> <?if ($virtMan_running=="yes"):?> <div style="position:relative;float:left;width:50%;text-align:right; margin-bottom:24px"> <form name="virtMan_start_stop" method="POST" action="/plugins/webGui/exec.php" target="progressFrame"> <input type="hidden" name="command" value="/etc/rc.d/rc.libvirt stop "> <input type="submit" value="Stop"> </form> </div> <div style="position:relative;float:left;width:50%;margin-bottom:24px"> <form name="virtMan_restart" method="POST" action="/plugins/webGui/exec.php" target="progressFrame"> <input type="hidden" name="command" value="/etc/rc.d/rc.libvirt restart "> <input type="submit" value="Restart"> </form> </div> <?else:?> <div style="position:relative;float:left;width:100%;text-align:center;margin-bottom:24px"> <form name="virtMan_start" method="POST" action="/plugins/webGui/exec.php" target="progressFrame"> <input type="hidden" name="command" value="/etc/rc.d/rc.libvirt start " /> <input type="submit" value="Start"> </form> </div> <?endif;?> <div id="title"> <span class="left">Information:&#32;</span> </div> <? if ($virtMan_filecheck == "no"):?> <p style="color:red;margin-left:10px;margin-right:10px;"><b>WARNING:</b> Your config image /boot/config/plugins/virtMan/virtMan.img doesn't exist</p> <?else:?> <p style="margin-left:10px;margin-bottom:0px;"><b>Total Free Space: <?=$virtMan_storagesize?> M</b></p> <?endif;?> </div> <div style="width: 49%; float:right"> <div id="title"> <span class="left">Configuration:&#32;</span> </div> <form name="virtMan_settings" method="POST" action="/plugins/webGui/update_cfg.php" target="progressFrame"> <input type="hidden" name="#file" value="<?=$virtMan_cfgfile;?>" /> <table class="settings"> <tr> <td>Enable libvirt: <input type="checkbox" name="enable" <?=($virtMan_service=="enable")?"checked=\"checked\"":"";?> onChange="checkENABLE(this.form);"> <input type="hidden" name="SERVICE" value="<?=$virtMan_service;?>"> </td> </tr> <br /> <td></td> <tr><td colspan="2"><div style="background-color:#FFFFFF;border:1px solid #000000;height:1px;width:100%;font-size:8px;"> </div></td></tr> </table> <div align="center"> <input type="submit" value="Apply" style="margin-bottom:8px"> <button type="button" style="margin-bottom:35px" onClick="done();">Done</button> </div> </form> <br/> </div> <script type="text/javascript"> function checkENABLE(form) { if (form.enable.checked == false ) { form.SERVICE.value = "disable"; } else { form.SERVICE.value = "enable"; } } </script>
  15. It's in /usr/local/emhttp/plugins/sabnzbd It can be either a php file with the same name as the .page file or you can combine them together in a sabnzbd.page file.
  16. Are you using a viewer/editor that understands Linux end-of-lines? If using Windows, open it in wordpad instead. No windows here And I'm not preaching, just sharing. I think NAS was the one who suggested to me a long time ago about separate reops and plg method originated from looking at the docker plg and at plgman.
  17. Sorry I pasted it from the raw github from the browser on my phone. Not sure what happened. Fixed now
  18. Here's a screenshot of what my webvirt git looks like. And the plg. Packages are in a separate repo. <?xml version='1.0' standalone='yes'?> <!DOCTYPE PLUGIN [ <!ENTITY name "webvirtmgr"> <!ENTITY author "dmacias72"> <!ENTITY version "2014.10.12"> <!ENTITY category "VM Support"> <!ENTITY pluginURL "https://raw.githubusercontent.com/dmacias72/&name;/master/&name;.plg"> <!ENTITY pkgURL "https://raw.githubusercontent.com/&author;/unRAID_6.0/master/"> <!ENTITY pkgs "/boot/packages/"> <!ENTITY plugin "/boot/config/plugins/&name;"> <!ENTITY emhttp "/usr/local/emhttp/plugins/&name;"> ]> <PLUGIN name="&name;" author="&author;" version="&version;" category="&category;" pluginURL="&pluginURL;" pkgURL="&pkgURL;" pkgs="&pkgs;" plugin="&plugin;" emhttp="&emhttp;"> > <!-- This Plugin installs webvirtmgr unRaid 6.0 ONLY. All dependencies are installed as needed and everything is controlable from the webgui. Credits: Troy Wagner: Heavily updated this plugin originally created / modified by Tim Alexander. This now contains more options and some validity to information added as to not break the app with invalid options. When invalid options are found, default values are loaded in its place. Spaces will be replaced with _ as passing anythign with a space breaks these plugins. Empty values which also break plugins, are replaced with default values also. Infuencer Benni-Chan: Much of the plug-in structure from his original plug-ins. Much of that code is still in place. Anatoliy Guskov aka retspen: for creating webvirtmgr https://github.com/retspen/webvirtmgr Rafi Khardalian: adding local socket support to webvirtmgr and help Peter: compiling libvirt packages, help and testing --> <FILE Name="&pkgs;libvirt-python-1.2.8-x86_64-1_SBo.tgz" Run="upgradepkg --install-new"> <URL>&pkgURL;libvirt-python-1.2.8-x86_64-1_SBo.tgz</URL> <MD5>df99c2de6e6c1df73ab740878922bfbe</MD5> </FILE> <FILE Name="&pkgs;tcl-8.6.1-x86_64-1.txz" Run="upgradepkg --install-new"> <URL>&pkgURL;tcl-8.6.1-x86_64-1.txz</URL> <MD5>81a2ee6b801ff63a0b96ac8239fc9f26</MD5> </FILE> <FILE Name="&pkgs;expect-5.44.1.15-x86_64-2.txz" Run="upgradepkg --install-new"> <URL>&pkgURL;expect-5.44.1.15-x86_64-2.txz</URL> <MD5>ba1415d7928ade48de4d17c74d65a7a1</MD5> </FILE> <FILE Name="&pkgs;webvirtmgr-site-packages-x86-64-1.txz" Run="upgradepkg --install-new"> <URL>&pkgURL;webvirtmgr-site-packages-x86-64-1.txz</URL> <MD5>7de46f65b5b0065b49d3b19fa00ab5e0</MD5> </FILE> <FILE Name="&pkgs;pysetuptools-3.6-x86_64-1ponce.txz" Run="upgradepkg --install-new"> <URL>&pkgURL;pysetuptools-3.6-x86_64-1ponce.txz</URL> <MD5>8ff5271f08e258ce46e8e96bebec66aa</MD5> </FILE> <FILE Name="&pkgs;git-1.8.4-x86_64-1.txz" Run="upgradepkg --install-new"> <URL>&pkgURL;git-1.8.4-x86_64-1.txz</URL> <MD5>e24d44ec30e7afc16c5509c4d9446140</MD5> </FILE> <!-- get from github as tarball --> <FILE Name="&plugin;/&name;-&version;.tar.gz"> <URL>"https://github.com/&author;/&name;/archive/&version;.tar.gz"</URL> </FILE> <!-- The 'install' script. --> <FILE Run="/bin/bash"> <INLINE> if [ ! -d &emhttp; ]; then mkdir -p &emhttp; fi tar -zxf &plugin;/&name;-&version;.tar.gz --strip=1 -C &emhttp;/ find &plugin; -type f -iname "*.tar.gz" ! -iname "&name;-&version;.tar.gz" -delete mv -f /usr/local/emhttp/plugins/&name;/rc.&name; /etc/rc.d/rc.&name; chmod 0770 /etc/rc.d/rc.&name; cp -nr /usr/local/emhttp/plugins/&name;/&name; /boot/config/plugins </INLINE> </FILE> <!-- The 'remove' script. --> <FILE Run="/bin/bash" Method="remove"> <INLINE> /etc/rc.d/rc.&name; stop rm -rf /usr/local/emhttp/plugins/&name; rm -f /etc/rc.d/rc.&name; rm -f &plugin;/&name;-&version;.tar.gz </INLINE> </FILE> <FILE Name="/tmp/hp-chkconf" Run="/bin/bash"> <INLINE> <![CDATA[ # This will check each entry in the config so nothing is missing, and if missing, sets to default CFGFILE=/boot/config/plugins/webvirtmgr/webvirtmgr.cfg [ ! `cat "$CFGFILE" | grep SERVICE` ] && echo "SERVICE=\"disable\"" >> "$CFGFILE" [ ! `cat "$CFGFILE" | grep INSTALLDIR` ] && echo "INSTALLDIR=\"/usr/local/webvirtmgr\"" >> "$CFGFILE" [ ! `cat "$CFGFILE" | grep ^PORT` ] && echo "PORT=\"8000\"" >> "$CFGFILE" [ ! `cat "$CFGFILE" | grep RUNAS` ] && echo "RUNAS=\"nobody\"" >> "$CFGFILE" [ ! `cat "$CFGFILE" | grep USERNAME` ] && echo "USERNAME=\"yes\"" >> "$CFGFILE" [ ! `cat "$CFGFILE" | grep PASSWORD` ] && echo "PASSWORD=\"yes\"" >> "$CFGFILE" rm /tmp/hp-chkconf ]]> </INLINE> </FILE> </PLUGIN>
  19. Do you mean in /boot/packages? I debated things like this too. Like should you remove /boot/config/plugins/plg_folder? Its too easy to accidentally hit the remove plugin link. If your talking a few MB then I say just leave it. Let the user delete those if they need flash drive space that bad. I do have it remove the old plg tar when updating. Then it gits the new tar. The way I look at it is you should not need internet to start your server. If you installed the plg from the webgui then you had internet and it installed all you needed then. That's why if you use method 2 for a plg then the tar is there on your flash ready to install. No network needed. You can remove the network check from your plg and a lot of other unnecessary steps. Look at my webvirtmgr.plg it's just a python app. It started off with your headphones plg as a template so I could use what you added to infuencers version. I'll have a look at that. Yeah the issue is that, lets take the Media Browser plugin i'm working on, it has like 20 dependencies thanks to libgdiplus, so are you saying I should include all of those dependency files in a tar.gz file and host it with the pluigin files? From one perspective, doing that means a much larger file (the tar.gz) but from the other it means no downloading on reboot if a dependency txz file is missing. But if I have a plugin that uses java, every time the user updates the plugin they will technically be re-downloading that java install file as part of the tar.gz file for the application. If multiple plugins use java, and the same version at that, then you get multiple copies of that install stored on the USB in each applications tar.gz file taking up more space. Utilizing the packages folder let apps have access to the install files and share them without duplication of the files. This also poses a problem for some of the apps that clone from GIT on startup. I'm not sure how is best to handle those when a server has no network. Host all depends in appsupport or a separate repo. The depends still get put in /boot/packages or wherever you want. You still have them downloaded in the same way with file declarations in the plg. But I was suggesting if you host them yourself in a separate repo from the plg then the link never gets broken. Granted for the utah slackware that's usually not a problem. But if you had some from a different less reliable repo. The plg tar would just have files for emhttp and config directories files not all the depends too.
  20. Do you mean in /boot/packages? I debated things like this too. Like should you remove /boot/config/plugins/plg_folder? Its too easy to accidentally hit the remove plugin link. If your talking a few MB then I say just leave it. Let the user delete those if they need flash drive space that bad. I do have it remove the old plg tar when updating. Then it gits the new tar. The way I look at it is you should not need internet to start your server. If you installed the plg from the webgui then you had internet and it installed all you needed then. That's why if you use method 2 for a plg then the tar is there on your flash ready to install. No network needed. You can remove the network check from your plg and a lot of other unnecessary steps. Look at my webvirtmgr.plg it's just a python app. It started off with your headphones plg as a template so I could use what you added to infuencers version.
  21. Also I use a linux app git-cola but I'm sure there's windows apps. I have each plg's repo cloned to my laptop hard drive. Then after I make changes and commit each file, I create tag e.g. 2014.10.24 then push commits plus tag. I usually forget to change date in plg or check push tags. Sorry if I'm explaining stuff you guys already know but I had to figure it out for myself so maybe it helps someone.
  22. In appsupport you could host all packages so a link never gets broken. I know you already have the unraid5 and 6 repos. You could create a separate repo for each plugin esp for unraid6 versions and drop the 64 from the plugin name (makes variables easier). You then strip out all the files created by the plg script and just host them in the plg repo. It makes managing them a little easier. Look in my github e.g. virtMan (the easiest), webvirtmgr, apache, vmMan maybe for some ideas. Recently it took me a few minutes to make a plg for vmMan since I already had a template from the others. I know you and dlandon's plugins have given me lots of ideas.
  23. Very true but I don't think Gary knows what an emergency situation is... I hear he has a backup server on the moon! You never know when the earth will blow up after all [emoji1] And I bet it's in a Lian Li Q25
  24. Yes. update-rc.d is the command to add the service to autostart and change the the run levels. Usually you just do "sudo update-rc.d servicename defaults" here's the manpage http://manpages.ubuntu.com/manpages/hardy/man8/update-rc.d.8.html
  25. I don't remember where I look or what command I ran to find my runlevel but it was 2. So I only changed rc2.d. There probably is a command switch to change that when you install the init defaults but I just manually did it. I just sftp to my vm and renamed the symlinks in rc2.d
×
×
  • Create New...