fix shutdown not saving, chmod error

This commit is contained in:
dmacias72
2016-02-11 00:58:55 -07:00
parent 121d89e076
commit d645ea7e9b
3 changed files with 11 additions and 5 deletions

View File

@ -1,14 +1,14 @@
#!/bin/sh
RC_SCRIPT="/etc/rc.d/rc.shellinaboxd shutdown"
RC_SCRIPT="/etc/rc.d/rc.shellinaboxd"
SD_RCFILE="/etc/rc.d/rc.local_shutdown"
# Update file permissions of scripts
chmod +0755 /usr/local/emhttp/plugins/shellinabox-plugin/scripts/* \
/etc/rc.d/rc.shellinaboxd \
/usr/local/bin/screenfetch
/usr/sbin/screenfetch
# add stop to shutdown script
if ! grep "$RC_SCRIPT" $SD_RCFILE >/dev/null 2>&1
then echo -e "\n[ -x $RC_SCRIPT ] && $RC_SCRIPT" >> $SD_RCFILE
then echo -e "\n[ -x $RC_SCRIPT ] && $RC_SCRIPT shutdown" >> $SD_RCFILE
fi
[ ! -x $SD_RCFILE ] && chmod u+x $SD_RCFILE