Summer-16/CSGO-VMPanel

serverScript mysql error

shaikhnedab opened this issue · 10 comments

getting following error while starting shell script for gameserver.

root@ubuntu:/mnt/actdm# ./vipLive.sh
1587945600
./vipLive.sh: 13: ./vipLive.sh: mysql: not found

Sending vip update notif

although i am getting notification on discord.

also while extending days in webpanel i am getting following error even after entering secret key.

ReferenceError: secretkey is not defined

Update:
i have fixed the first mysql issue.

for now i am facing 2 issues as follows.

  1. cannot extend vip days getting error mentioned in above comment.
  2. webpanel doesn't shows vip list instead i am getting 404 not found error. (homepage)

About the 1st error: "secretkey is not defined", I have found it and I will push the updated code in next hour,
and
For 2nd error can you give me any logs from the console and what route you are trying to open in the panel?


EDIT
Use updated code your errors should resolve if you still getting any error, let me know.

i have tested the latest version and extend days issue is fixed.
but for vip list on homepage i am just getting a blankpage. it no longer shows error 404 but still doesn't shows current vip either.

Yes, you will get an empty page because the function was not able to fetch data from MYSQL DB, Look inside the server console you must be getting some error there.

but it is adding to database perfectly fine. which means it is able to connect to database.
image
not even getting the

maybe its database maybe not, but I need the console logs to know the error you are encountering.
Do the following to get the logs

  • Stop the service (if you running the server by service )
  • go to the panelServer folder
  • run node server.js ( from this moment )
  • keep the console open and open panel in the browser
  • You will get logs in console and error whatever is happening in the server ( to this moment)
    give those logs.

so dumb of me forgot to delete extra server database table from config file. it is working fine now.

i have another question.
is using a cron job with timer is the only way to refresh admins_simple.ini? i mean for removing vip running that bash script once a day is good. but whenever adding a vip, waiting cron to run the script or manually running it is not that good. if u know what i mean. or is there any other way to do it?

The best way to do it is putting the vipLive.sh in cron , A cron which will run on a fixed interval like 1 hour, and then that script will refresh VIP in server every one hour.

And for deleting there is no bash script server does that every 12hours.

yes figured it out.
i will just create a button in admin section linking to php scripts which will run the sh script (vipLive.sh) on respective server and also a php script for sm_reloadadmins so i dont have to wait for cron to update it.

That sounds good, anyways closings the issue as it is resolved.