This is probably something silly due to my inexperience with Debian, but the command: sudo /opt/sqlanywhere17/bin64/dbsvc -as -t network -s manual -w demosvc -n demo17 /vagrant/DBL/demo.dbreturns: SQL Anywhere Service Utility 17.0.0.1358 You do not have permission to manage services. The documentation says "You must have permissions on the /etc/init.d directory to create, edit, or delete services.", so I changed the permissions setting on /etc/init.d with: sudo chmod 777 /etc/init.dHowever I still get the error "You do not have permission to manage services.". I'm running Debian 8 and SA 17.0.0.1358. I know that Debian is using systemd to manage services, so tried looking through the dbsvc script (and those it calls) and found a script sudo systemctl start SA_.serviceit fails and the journal entries go on about "Failed at step EXEC spawning /usr/bin/rm: No such file or directory" and by now I'm way over my head. I have created and run SA services many times under Ubuntu with no problems, so this is a bit of a mystery. Any hints on where I've gone wrong, or what I could try next? Thanks. |
Ok, I got it to work by making the following changes to the distribution scripts. #1: in the file systemd-escape "$i"to systemd-escape "$1"This seems to fix the problem with the service name only being SA_.service (rather than something like SA_demosvc.service ) and I imagine it might work on systemd .
#2: in the file /usr/lib/systemd/systemto /lib/systemd/systemThis seems to put the service script in the right place. #3: in the file /usr/bin/rm to /bin/rmThis provides the correct path to the rm command.
NOTE: My changes #2 and #3 may only apply to Debian 8 systems - I suspect they might break the script on others :-(. Thanks for sharing Terry. This should help others ... and will be helpful for planning future platform support.
(12 Aug '16, 18:47)
Nick Elson S...
|
What I can tell you from my experience, these scripts do not support linux systems well. In my case, dbsvc creates SA_.service in RHEL as well.
I am using Debian 7.10 and dbsvc created SA_xxxx correctly. My suggestion is to create the systemd service manually: https://people.debian.org/~stapelberg/debconf13-making-your-package-work-with-systemd.pdf
This would be a second posting that indicates there is a service naming problem and that needs to be looked into in more detail.
Since Vlad has it working on his Debian 7.10 it would seem to be specific to Debian 8 and CentOS 7 ... which could be the specific shell you are running.
Can you force this be used in Bash and see what that produces on your side?