From 56ec01546649f7abc4a4cc909dda2638fc366c62 Mon Sep 17 00:00:00 2001 From: Derek Macias Date: Mon, 21 Dec 2015 02:37:56 -0700 Subject: [PATCH] minor changes --- plugins/shellinabox-plugin.plg | 20 ++++++++++++++++-- .../shellinabox-plugin/Shellinabox.page | 3 ++- ...shellinabox.png => shellinabox-plugin.png} | Bin 3 files changed, 20 insertions(+), 3 deletions(-) rename source/shellinabox-plugin/usr/local/emhttp/plugins/shellinabox-plugin/images/{shellinabox.png => shellinabox-plugin.png} (100%) diff --git a/plugins/shellinabox-plugin.plg b/plugins/shellinabox-plugin.plg index 8138a29d..7c00705b 100755 --- a/plugins/shellinabox-plugin.plg +++ b/plugins/shellinabox-plugin.plg @@ -1,8 +1,10 @@ + + - + @@ -123,7 +125,7 @@ The 'remove' script. /usr/local/emhttp/plugins/&name;/scripts/stop removepkg &plgpath;/*.txz rm -rf &emhttp; -rm -f &plgpath;/&plgname;.txz +rm -f &plgpath;/*.txz rm -f &plgpath;/&plgname;.md5 echo "" @@ -136,4 +138,18 @@ echo "" + + +> "$CFGFILE" +[ ! `cat "$CFGFILE" | grep ^PORT` ] && echo "PORT=\"4200\"" >> "$CFGFILE" +[ ! `cat "$CFGFILE" | grep RUNAS` ] && echo "RUNAS=\"nobody\"" >> "$CFGFILE" +rm /tmp/shellinabox-chkconf +]]> + + + diff --git a/source/shellinabox-plugin/usr/local/emhttp/plugins/shellinabox-plugin/Shellinabox.page b/source/shellinabox-plugin/usr/local/emhttp/plugins/shellinabox-plugin/Shellinabox.page index bdd74751..e6d13c29 100644 --- a/source/shellinabox-plugin/usr/local/emhttp/plugins/shellinabox-plugin/Shellinabox.page +++ b/source/shellinabox-plugin/usr/local/emhttp/plugins/shellinabox-plugin/Shellinabox.page @@ -1,4 +1,4 @@ -Icon="shellinabox.png" +Icon="shellinabox-plugin.png" Menu="NetworkServices" Title="Command Line" --- @@ -60,6 +60,7 @@ function checkRUNNING(form) { } else $(".stopped").prop("disabled", (form.SERVICE.value == "enable")); + if (form.SERVICE.value == "enable") form.command.value = "/usr/local/emhttp/plugins/shellinabox-plugin/scripts/start"; else { diff --git a/source/shellinabox-plugin/usr/local/emhttp/plugins/shellinabox-plugin/images/shellinabox.png b/source/shellinabox-plugin/usr/local/emhttp/plugins/shellinabox-plugin/images/shellinabox-plugin.png similarity index 100% rename from source/shellinabox-plugin/usr/local/emhttp/plugins/shellinabox-plugin/images/shellinabox.png rename to source/shellinabox-plugin/usr/local/emhttp/plugins/shellinabox-plugin/images/shellinabox-plugin.png