This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Script change in database activation
#3
I am changing the script itself.
I want to upload a script with ftp and the lm have to import it. I have 52 SL to update the script automatic everytime i update my masterscript.
It works but only with restart. I think there must be a better option.
The script to edit is a resident

My Import script is actual:

Code:
file = '/home/ftp/importscripts/script.lua'

if io.exists(file) then
log('start scriptimport')
data = io.readfile(file)
db:query('UPDATE scripting SET script=? WHERE name=?', data, 'imported_from_ftp')
os.remove (file)
os.execute("reboot")
end
Reply


Messages In This Thread
RE: Script change in database activation - by sebastian.strasser - 15.06.2021, 17:24

Forum Jump: