2015-12-21 09:11:23 +00:00
|
|
|
#!/bin/sh
|
2016-02-11 07:25:15 +00:00
|
|
|
RC_SCRIPT="/etc/rc.d/rc.shellinaboxd shutdown"
|
|
|
|
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
|
|
|
|
|
|
|
|
# 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
|
|
|
|
fi
|
|
|
|
[ ! -x $SD_RCFILE ] && chmod u+x $SD_RCFILE
|