Failed to run the package service - Synology DS415+

I got this same error (Failed to run the package service) and after a few hours of debugging it turns out the service script tries to source /root/.profile. On my DS412+ I didn’t have this file. It might just have been something on my particular NAS because I’ve had it for years and I use the CLI on the synology extensively and use all sort of CLI tools. I might have deleted this file at some point setting up my shell environment. Once I logged in as root (“sudo -i” as admin) and touch this file it finally started. I have the same problem as others that if I try to stop the service it’s left running and I need to kill it manually from the shell before I can start it again. Posting this reply in case someone else has the same error shown in the screenshot above and might have the same problem as myself.