/* password update
 * This program is intended to be called from Suntan Special
 *
 * Description
 *   This command updates the Suntan Special phone home userid, password and URL. This
 *   information is used to download additional applications for Suntan Special.
 *
 * Copyright (C) 2019 Blonde Guy
 * All Rights Reserved
 */

productName = 'Update Password'
productDate = '2019-01-20 10:00:00'
productCategory = 'Configuration'

oldPhoneUser = cdglobal('phoneUser')
if oldPhoneUser <> 'suntan-user' then do
   call SetSetting 'phoneUser', 'suntan-user'
   call LogCdi "Updated phoneUser"
end

oldPhonePassword = cdglobal('phoneUser')
if oldPhonePassword <> 'OS2expert' then do
   call SetSetting 'phonePassword', 'OS2expert'
   call LogCdi "Updated phonePassword"
end

oldPhoneHomeURL = cdglobal('phoneHomeURL')
if oldPhoneHomeURL <> 'ftp://ftp.blondeguy.com/SuntanV6/update.zip' then do
   call SetSetting 'phoneHomeURL', 'ftp://ftp.blondeguy.com/SuntanV6/update.zip'
   call LogCdi "Updated phoneHomeURL"
end

return 0
