opkginstall.sh 561 B

12345678910111213141516171819
  1. #!/bin/sh
  2. opkg() {
  3. if [[ `echo $@ | grep -o -E '^install'` ]]; then
  4. command opkg $@
  5. #rm -Rf /lib/upgrade/keep.d/php7*
  6. #sed -i 's/service_start $PROG -y/service_start $PROG -R -y/g' /etc/init.d/php7-fpm
  7. #sed -i "s/user =.*/user = root/g" /etc/php7-fpm.d/www.conf
  8. #/etc/init.d/php7-fpm restart
  9. [[ ! "`pgrep UnblockNeteaseMusic`" && "`uci get unblockmusic.@unblockmusic[0].enabled`" == 1 ]] && {
  10. /etc/init.d/unblockmusic restart
  11. }
  12. rm -Rf /tmp/luci-modulecache /tmp/luci-indexcache
  13. else
  14. command opkg $@
  15. fi
  16. rm -f /var/lock/opkg.lock
  17. }