Преглед на файлове

chore(init): check if the file is empty

Signed-off-by: Tianling Shen <[email protected]>
Tianling Shen преди 4 години
родител
ревизия
77ee8663b7
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      root/etc/init.d/unblockneteasemusic

+ 2 - 2
root/etc/init.d/unblockneteasemusic

@@ -57,8 +57,8 @@ start_service()
 	echo "*/5 * * * * /usr/share/$NAME/log_check.sh" >> "/etc/crontabs/root"
 	/etc/init.d/cron restart
 
-	[ ! -e "/usr/share/$NAME/core/app.js" ] && { rm -f "/usr/share/$NAME/local_ver"; sh "/usr/share/$NAME/update.sh" "update_core_non_restart"; }
-	[ ! -e "/usr/share/$NAME/core/app.js" ] && { echo "Core Not Found, please download it before starting." >> "/tmp/$NAME.log"; exit 1; }
+	[ ! -s "/usr/share/$NAME/core/app.js" ] && { rm -f "/usr/share/$NAME/local_ver"; sh "/usr/share/$NAME/update.sh" "update_core_non_restart"; }
+	[ ! -s "/usr/share/$NAME/core/app.js" ] && { echo "Core Not Found, please download it before starting." >> "/tmp/$NAME.log"; exit 1; }
 
 	procd_open_instance "$NAME"
 	procd_set_param command node "/usr/share/$NAME/core/app.js"