kjk / dbworkbench

Database workbench for Mac and Windows
MIT License
5 stars 1 forks source link

fix ansible/dbworkbench.initd to fix ansible/deploy.sh #18

Closed kjk closed 9 years ago

kjk commented 9 years ago

One that worked in 13.10 doesn't work in 15.04. I wrote it based on nginx's.

On the server, /etc/init.d/dbworkbench start fails.

Running the command that is supposedly being run by /etc/init.d/dbworkbench start: start-stop-daemon --verbose --oknodo --start --background --chuid dbworkbench --exec home/dbworkbench/www/app/current/server_run.sh works. Strange is this world.

kjk commented 9 years ago

Maybe needs to convert to systemd? Don't know how systemd operates, there are /etc/init.d/* files and I can't tell what I might be doing wrong.

The error message from ansible is:

failed: [dbworkbench] => {"changed": true, "cmd": ["/etc/init.d/dbworkbench", "stop"], "delta": "0:00:00.023500", "end": "2015-04-25 20:58:06.919650", "rc": 1, "start": "2015-04-25 20:58:06.896150", "warnings": []}
stderr: Failed to stop dbworkbench.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
stdout: Stopping dbworkbench (via systemctl): dbworkbench.service failed!

When running /etc/init.d/dbworkbench start on the host:

[....] Starting dbworkbench (via systemctl): dbworkbench.serviceFailed to start dbworkbench.service: Unit dbworkbench.service failed to load: No such file or directory.
 failed!
dinedal commented 9 years ago

Huh I thought upstart was the one true way too

kjk commented 9 years ago

Whatever works. I only know /etc/init.d way.

Fixed for now which unblocks postgres setup in ansibe.

I ran systemctl enable dbworkbench on the server. Not sure if it was needed, if yes it should also go into deploy.yml