Open lmkelly opened 3 years ago
Looking into the use of osticket plugins to allow the email attachments to be accessed through the file system.
It was super easy to install but when it puts the files into the folder it puts them into folders named after the first character of the random hash that is assigned to the file name. In an ideal world I would be able to find a way to change the plugin to set the file names to the name of the attachment as it's sent into osticket, but for now I'm going to try to just get rid of the folders and that way my monitor script on the backend will work.
It's proving extremely difficult to modify the plugin in any way and test whether or not it works without messing up my osTicket so I've posted a thread on their forums to see what steps I take next.
I haven't gotten any replies and I don't feel like messing around with that plugin anymore, so I'm going to write a bash script to accommodate the weird output format.
going to be using this bash module https://linux.die.net/man/1/inotifywait
just got the script officially working https://github.com/lmkelly/Capstone/blob/master/back_end2
resources used: https://stackoverflow.com/questions/229551/how-to-check-if-a-string-contains-a-substring-in-bash https://stackoverflow.com/questions/20360151/using-if-within-a-while-loop-in-bash https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_09_02.html https://unix.stackexchange.com/questions/132763/inotifywait-different-action-on-file-or-dir https://ryanstutorials.net/bash-scripting-tutorial/bash-if-statements.php
Finding a practical way to send the config data from the back end to the front end