LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-02-2023, 06:48 AM   #1
Maris-S
Member
 
Registered: Feb 2010
Location: Latvia
Distribution: Slackware 15.0
Posts: 33

Rep: Reputation: 2
Systemd services


Hello!

I didn't have to research systemd dependent software before, but I was implementing Zabbix monitoring system on our office network and noticed their new agent2 requires systemd.

I don't need agent2 on Slackware right now, I'm using it as Zabbix server and it is virtual machine anyway, but probably I'll need it at some point. I was looking at agent2 because it has build-in solution for hdd/ssd SMART monitoring, and who knows, maybe Zabbix will drop support for agent1 in the future.

So the question for now is in general. Is it possible to run systemd required services on Slackware? Any workaround would be ok too, just need to know if it's possible to work with such software if necessary, before I choose software and OS for office monitoring system.

Thanks in advance!
 
Old 01-02-2023, 07:25 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
While Slackware includes a few systemd services in /usr/lib/systemd (I assume not used by default but as shipped by upstream), the issue could more likely be the lack of libsystemd. Just a guess as I did not dig into agent2 to check.
 
Old 01-02-2023, 07:48 AM   #3
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 635

Rep: Reputation: 484Reputation: 484Reputation: 484Reputation: 484Reputation: 484
I hope these links will help you...
https://gitlab.alpinelinux.org/alpin...-/issues/13368

https://pkgs.alpinelinux.org/package...ity/x86/zabbix

https://git.alpinelinux.org/aports/t...abbix?h=master
 
2 members found this post helpful.
Old 03-12-2024, 10:15 AM   #4
zux
Member
 
Registered: Jul 2006
Location: latvia
Distribution: slackware
Posts: 140

Rep: Reputation: 26
Quote:
Originally Posted by Maris-S View Post
Hello!

I didn't have to research systemd dependent software before, but I was implementing Zabbix monitoring system on our office network and noticed their new agent2 requires systemd.

I don't need agent2 on Slackware right now, I'm using it as Zabbix server and it is virtual machine anyway, but probably I'll need it at some point. I was looking at agent2 because it has build-in solution for hdd/ssd SMART monitoring, and who knows, maybe Zabbix will drop support for agent1 in the future.

So the question for now is in general. Is it possible to run systemd required services on Slackware? Any workaround would be ok too, just need to know if it's possible to work with such software if necessary, before I choose software and OS for office monitoring system.

Thanks in advance!
Did you find a good solution? Looking to create slackbuilds package for agent2, but did not yet investigate in more details.
 
Old 03-13-2024, 07:35 AM   #5
saxa
Senior Member
 
Registered: Aug 2004
Location: Nova Gorica, Salvador
Distribution: Slackware
Posts: 1,213

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by Maris-S View Post
So the question for now is in general. Is it possible to run systemd required services on Slackware? Any workaround would be ok too, just need to know if it's possible to work with such software if necessary, before I choose software and OS for office monitoring system.

Thanks in advance!
Have you tried to use dlackware ? Bart was working on getting Slackware with systemd but I dont have idea if he is still on it.
See here: https://github.com/Dlackware/systemd
 
Old 03-15-2024, 04:29 AM   #6
zux
Member
 
Registered: Jul 2006
Location: latvia
Distribution: slackware
Posts: 140

Rep: Reputation: 26
I think the question here is not that much about systemd itself, more about how to run the specific service.
Upstream packages rely on systemd.
I uploaded a simple version of it to slackbuilds, please check and let me know if that works for you.
 
Old 03-15-2024, 06:06 AM   #7
saxa
Senior Member
 
Registered: Aug 2004
Location: Nova Gorica, Salvador
Distribution: Slackware
Posts: 1,213

Rep: Reputation: 297Reputation: 297Reputation: 297
Let me just understand, service files are run by systemd daemon isnt it ? They are called by the service, but then you should have the daemon to enable it or run it.
Or do I get whole that SysD thingy wrong ?
 
Old 03-15-2024, 06:43 AM   #8
zux
Member
 
Registered: Jul 2006
Location: latvia
Distribution: slackware
Posts: 140

Rep: Reputation: 26
The application runs in the foreground... or background, but doesn't daemonize. So systemd handles that.
If you just start it normally, it runs as root, as it also doesn't switch user. systemd unit is also configured to run it with correct user.
AFAIK those are the main problems with it.
But rc script with this seems to do the trick:

su -s /bin/sh -c "/usr/sbin/zabbix_agent2 >> /var/log/zabbix/zabbix_agent2.log 2>&1 &" zabbixagent
 
1 members found this post helpful.
Old 03-17-2024, 09:12 AM   #9
mumahendras3
Member
 
Registered: Feb 2018
Location: Indonesia
Distribution: Slackware-current + s6 + s6-rc + s6-linux-init (github.com/mumahendras3/sl6ckware)
Posts: 125

Rep: Reputation: Disabled
Quote:
Originally Posted by zux View Post
The application runs in the foreground... or background, but doesn't daemonize. So systemd handles that.
If you just start it normally, it runs as root, as it also doesn't switch user. systemd unit is also configured to run it with correct user.
AFAIK those are the main problems with it.
But rc script with this seems to do the trick:

su -s /bin/sh -c "/usr/sbin/zabbix_agent2 >> /var/log/zabbix/zabbix_agent2.log 2>&1 &" zabbixagent
I suggest looking at "setpriv" as a better way to run a process as another user, e.g.,
Code:
setpriv --reuid zabbixagent --regid zabbixagent --init-groups -- /usr/sbin/zabbix_agent2 >> /var/log/zabbix/zabbix_agent2.log 2>&1 &
Another solution would be using a proper process supervisor to run the zabbix_agent2 daemon. Slackware ships "daemon" by default, which features uid/gid changing and stdout/stderr forwarding to syslog.

Last edited by mumahendras3; 03-17-2024 at 09:19 AM. Reason: Minor formatting and grammar fixes
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
With Linux 4.15.4 or later several systemd services fail, like flush and partition services, for several distros fusion809 Linux - Laptop and Netbook 6 04-13-2018 11:23 PM
LXer: Is systemd as bad as boycott systemd is trying to make it? LXer Syndicated Linux News 0 09-03-2014 05:50 PM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 09:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration