cloudbeaver
cloudbeaver copied to clipboard
SystemD Control
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Please advise best way to control via systemd.
Describe the solution you'd like A clear and concise description of what you want to happen.
Example systemd script in Wiki.
Here is what I'm using for now just FYI:
cat << 'EOF' >/opt/cloudbeaver/cb_start.sh
#!/bin/bash
cd /opt/cloudbeaver/cloudbeaver/deploy/cloudbeaver/
./run-server.sh
EOF
chmod +x /opt/cloudbeaver/cb_start.sh
cat << 'EOF' >/opt/cloudbeaver/cb_stop.sh
#!/bin/bash
PID="$(ps aux | grep cloudbeaver | awk '{print $2}' | head -1))"
kill $PID
EOF
chmod +x /opt/cloudbeaver/cb_stop.sh
cat << 'EOL' >/lib/systemd/system/cloudbeaver.service
[Unit]
Description=Cloud Beaver
Requires=network-online.target
[Service]
Restart=on-abnormal
ExecStart=/opt/cloudbeaver/cb_start.sh
ExecStop=/opt/cloudbeaver/cb_stop.sh
[Install]
WantedBy=multi-user.target
EOL
systemctl enable cloudbeaver
systemctl start cloudbeaver
systemctl status cloudbeaver
Well, we usually use suervisord for this. Config looks like this:
[program:cloudbeaver_server]
directory=/path-to-cb
command=/path-to-cb/run-server.sh
user = user
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/log/cloudbeaver/server.log
Well, we usually use suervisord for this. Config looks like this:
[program:cloudbeaver_server] directory=/path-to-cb command=/path-to-cb/run-server.sh user = user autostart=true autorestart=true redirect_stderr=true stdout_logfile=/var/log/cloudbeaver/server.log
For a future DEB or RPM package I would assume support for SystemD would maybe a more preferable option since it comes built in on most popular distributions? It requires a privileged user to use it, but you need that anyway to install a DEB or RPM package, especially if this would eventually see potential in an Enterprise environment, also less dependencies to deal with for the sysadmin administering the cloudbeaver servers.
Good point. Well, we probably will add "template" config for SystemD too.
Any news?
Unfortunately we do not have an estimated time for this ticket now.
Unfortunately, we won’t support SystemD in the near future.