Unraid-SlackPack/source/ungit/install/doinst.sh

13 lines
340 B
Bash
Raw Normal View History

2016-11-06 00:07:29 +00:00
#!/bin/sh
RC_SCRIPT="/etc/rc.d/rc.ungit"
SD_RCFILE="/etc/rc.d/rc.local_shutdown"
# Update file permissions of scripts
chmod +0755 $RC_SCRIPT
# add stop to shutdown script
if ! grep "$RC_SCRIPT" $SD_RCFILE >/dev/null 2>&1
then echo -e "\n[ -x $RC_SCRIPT ] && $RC_SCRIPT stop" >> $SD_RCFILE
fi
[ ! -x $SD_RCFILE ] && chmod u+x $SD_RCFILE