I have started to create new sms adapter for smsteknik. I copied Massenversand “module” for starting point. I have just replaced all masseversand → smsteknik. When I install this package and run
zammad run rake zammad:package:migrate
zammad run rake assets:precompile
systemctl restart zammad
zammad wont start and I cannot figure out why.
My environment is
This is Zammad version 5.3.0-1670421755.60c0505c.focal
Ubuntu 20.04
Mariadb 10.6
Here is my smsteknik.szpm
{
"name": "SMSTeknik",
"version": "1.0.0",
"vendor": "Onnisys Oy",
"license": "MIT",
"url": "https://ww.onnisys.fi/",
"buildhost": "zammad.onnisys.local",
"builddate": "2022-12-06 15:53:00 UTC",
"change_log": [
{
"version": "1.0.0",
"date": "2022-12-06 15:53:00 UTC",
"log": "Initial version."
}
],
"description": [
{
"language": "en",
"text": "Adding one way SMS for SMS Teknik"
}
],
"files": [
{
"location": "app/models/channel/driver/sms/smsteknik.rb",
"permission": 644,
"encode": "base64",
"content": "IyBDb3B5cmlnaHQgKEMpIDIwMTItMjAyMiBPbm5pc3lzIE95LCBodHRwczovL3d3dy5vbm5pc3lzLmZpLwoKY2xhc3MgQ2hhbm5lbDo6RHJpdmVyOjpTbXM6OlNNU1Rla25payA8IENoYW5uZWw6OkRyaXZlcjo6U21zOjpCYXNlCiAgTkFNRSA9ICdzbXM vc21zdGVrbmlrJy5mcmVlemUKCiAgZGVmIHNlbmQob3B0aW9ucywgYXR0ciwgX25vdGlmaWNhdGlvbiA9IGZhbHNlKQogICAgUmFpbHMubG9nZ2VyLmluZm8gIlNlbmRpbmcgU01TIHRvIHJlY2lwaWVudCAje2F0dHJbOnJlY2lwaWVudF19IgoKICAgIHJldHVybiB0cnVlIGlm IFNldHRpbmcuZ2V0KCdpbXBvcnRfbW9kZScpCgogICAgUmFpbHMubG9nZ2VyLmluZm8gIkJhY2tlbmQgc2VuZGluZyBTTVNUZWtuaWsgU01TIHRvICN7YXR0cls6cmVjaXBpZW50XX0iCiAgICBiZWdpbgogICAgICBzZW5kX2NyZWF0ZShvcHRpb25zLCBhdHRyKQoKICAgICAgd HJ1ZQog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