Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Any idea what am I doing wrong with this .plg file

Featured Replies

Can someone take a look at this .plg for me, I only have a vague understanding of what I am doing with the .plg file and used one of PhAzEs .plg's as a starting point.

 

This plg is just to help make it easier to install and remove the alternative webgui I am working on http://lime-technology.com/forum/index.php?topic=32064.0, and is really only for testing at the moment as it's not very feature complete.

 

I am trying to get the built in PHP server running in the background and using:

 

echo -e "\t Starting PHP server"

nohup php -S 0.0.0.0:8888 -t "$LOCALLOC/&name;/" > /dev/null 2>&1 &

echo "...Install complete!"

 

Now "...Install complete!" is showing which suggests it has indeed launched in the background (when just using php -S 0.0.0.0:8888 -t "$LOCALLOC/&name;/" I never saw "...Install complete!" as it was waiting for input), however, the done button doesn't show.

 

While the install plugin dialog box is open if I go to http://myserverip:8888 the webgui shows up, but if I close the dialog it stops running.

 

Any ideas?  Also if anyone has any suggestions on resources to look at for creating .plg files please let me know.

Can someone take a look at this .plg for me, I only have a vague understanding of what I am doing with the .plg file and used one of PhAzEs .plg's as a starting point.

 

This plg is just to help make it easier to install and remove the alternative webgui I am working on http://lime-technology.com/forum/index.php?topic=32064.0, and is really only for testing at the moment as it's not very feature complete.

 

I am trying to get the built in PHP server running in the background and using:

 

echo -e "\t Starting PHP server"

nohup php -S 0.0.0.0:8888 -t "$LOCALLOC/&name;/" > /dev/null 2>&1 &

echo "...Install complete!"

 

Now "...Install complete!" is showing which suggests it has indeed launched in the background (when just using php -S 0.0.0.0:8888 -t "$LOCALLOC/&name;/" I never saw "...Install complete!" as it was waiting for input), however, the done button doesn't show.

 

While the install plugin dialog box is open if I go to http://myserverip:8888 the webgui shows up, but if I close the dialog it stops running.

 

Any ideas?  Also if anyone has any suggestions on resources to look at for creating .plg files please let me know.

Real quick, I remember some posts about this.  The background process is still tying up the window.  What I think you should try is running a background script which then calls the background process.  Just woke up however so could be completely off base

Have the install.plg script schedule the another script to execute via "at" or "cron" instead of executing directly.

You can have a look at the PLG files I have created for s3_sleep and cache_dirs. These have a workaround in place to cope with the process start in the background using the 'at' command.

 

  • Author

Thanks all

 

@bonienl will do, thanks.

  • Author

Thanks bonienl, I got that working by adding:

 

<!--
Workaround to start service.
-->
<FILE Name="/tmp/start_service">
<INLINE>
#!/bin/bash
LOCALLOC="/boot"
nohup php -S 0.0.0.0:8888 -t "$LOCALLOC/&name;/" > /dev/null 2>&1 &
</INLINE>
</FILE>


<!--
The 'post-install' script.
-->
<FILE Run="/bin/bash">
<INLINE>
# Start service
at -M -f /tmp/start_service now 2>/dev/null
rm -f /tmp/start_service

echo "...Install complete!"

</INLINE>
</FILE>

 

Can I add a variable that is used throughout? I tried adding something like <!ENTITY localLoc "/boot"> so I could use &localLoc; instead of setting LOCALLOC="/boot"="/boot" in each place and using $LOCALLOC, but that errored (I'm guessing there are specific entity names).

 

 

  • Author

Ignore that, I just tried it again and it worked fine, I set

 

<!DOCTYPE PLUGIN [

<!ENTITY name "Cerberus">

<!ENTITY displayName "Cerberus WebGUI">

<!ENTITY author "Kode">

<!ENTITY plgVersion "2015.06.29">

<!ENTITY pluginURL "https://bitbucket.org/Kode/unraid/raw/master/plugins/cerberus-flash.plg">

<!ENTITY appURL "https://bitbucket.org/Kode/cerberus/get/HEAD.zip">

<!ENTITY installDir "/boot">

]>

 

<PLUGIN

name="&name;"

author="&author;"

version="&plgVersion;"

pluginURL="&pluginURL;"

installDir="&installDir;"

>

 

Not sure if it's needed in the PLUGIN section as well?  Either way it seems to work :)

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.