This commit is contained in:
dmacias72 2016-03-11 18:49:14 -07:00
parent f21ee057bf
commit fa4c54e2d5

View File

@ -101,6 +101,7 @@ This Plugin installs and controls shellinabox for unRaid 6.1 All dependencies a
SERVICE="disable" SERVICE="disable"
SSL="disable" SSL="disable"
SCREEN="disable" SCREEN="disable"
BACKUP="disable"
IPADDR="disable" IPADDR="disable"
PORT="4200" PORT="4200"
RUNAS="nobody" RUNAS="nobody"
@ -199,19 +200,20 @@ echo ""
</INLINE> </INLINE>
</FILE> </FILE>
<FILE Name="/tmp/shellinabox-chkconf" Run="/bin/bash"> <FILE Name="/tmp/cmdline-chkconf" Run="/bin/bash">
<INLINE> <INLINE>
<![CDATA[ <![CDATA[
#!/bin/sh #!/bin/sh
# This will check each entry in the config so nothing is missing, and if missing, sets to default # This will check each entry in the config so nothing is missing, and if missing, sets to default
CFGFILE=/boot/config/plugins/shellinabox-plugin/shellinabox-plugin.cfg CFGFILE=/boot/config/plugins/cmdline/cmdline.cfg
[ ! `cat "$CFGFILE" | grep SERVICE` ] && echo "SERVICE=\"disable\"" >> "$CFGFILE" [ ! `cat "$CFGFILE" | grep SERVICE` ] && echo "SERVICE=\"disable\"" >> "$CFGFILE"
[ ! `cat "$CFGFILE" | grep SCREEN` ] && echo "SCREEN=\"disable\"" >> "$CFGFILE" [ ! `cat "$CFGFILE" | grep SCREEN` ] && echo "SCREEN=\"disable\"" >> "$CFGFILE"
[ ! `cat "$CFGFILE" | grep BACKUP` ] && echo "BACKUP=\"disable\"" >> "$CFGFILE"
[ ! `cat "$CFGFILE" | grep SSL` ] && echo "SSL=\"disable\"" >> "$CFGFILE" [ ! `cat "$CFGFILE" | grep SSL` ] && echo "SSL=\"disable\"" >> "$CFGFILE"
[ ! `cat "$CFGFILE" | grep IPADDR` ] && echo "IPADDR=\"disable\"" >> "$CFGFILE" [ ! `cat "$CFGFILE" | grep IPADDR` ] && echo "IPADDR=\"disable\"" >> "$CFGFILE"
[ ! `cat "$CFGFILE" | grep ^PORT` ] && echo "PORT=\"4200\"" >> "$CFGFILE" [ ! `cat "$CFGFILE" | grep ^PORT` ] && echo "PORT=\"4200\"" >> "$CFGFILE"
[ ! `cat "$CFGFILE" | grep RUNAS` ] && echo "RUNAS=\"nobody\"" >> "$CFGFILE" [ ! `cat "$CFGFILE" | grep RUNAS` ] && echo "RUNAS=\"nobody\"" >> "$CFGFILE"
rm /tmp/shellinabox-chkconf rm /tmp/cmdline-chkconf
]]> ]]>
</INLINE> </INLINE>
</FILE> </FILE>