search for: execstartpre

Displaying 20 results from an estimated 97 matches for "execstartpre".

2018 Aug 07
2
systemd equivalent of xinetd 'only_from' and 'banner_fail' attributes
I'm attempting to port an existing xinetd service from CentOS 6 to something equivalent with systemd for CentOS 7 The existing xinetd config uses the attributes 'only_from' to limit connections from a limited set of remote hosts and 'banner_fail' to print a suitable error message when access is denied However, I can't find suitable 'equivalents' with systemd
2017 May 04
2
running tomcat as non-root user.. (/var/run pidfile issue)
...systemd startup script cant seem to write to /var/run as a non-root user to drop a pidfile.. If I create a directory in /var/run owned by my user, it gets wiped out on reboot. Ive searched and found this https://blog.hqcodeshop.fi/archives/93-Handling-varrun-with-systemd.html which says to use ExecStartPre to fudge creating directories in /var/run so what non-root users can write there.. Is that the suggested way to do this? It seems awful kludgey. Jason
2015 Sep 08
3
Report on Xen-4.6rc2 from virt7-xen-46-candidate
...tored.service and the corresponding unit-file: [root at xencen7ws ~]# systemctl status xenstored xenstored.service - The Xen xenstore Loaded: loaded (/usr/lib/systemd/system/xenstored.service; disabled) Active: active (running) since Tue 2015-09-08 23:13:43 CEST; 13min ago Process: 757 ExecStartPre=/bin/mkdir -p /var/run/xen (code=exited, status=0/SUCCESS) Process: 753 ExecStartPre=/bin/rm -f /var/lib/xenstored/tdb* (code=exited, status=0/SUCCESS) Process: 740 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities (code=exited, status=0/SUCCESS) Main PID: 760 (xenstored) CG...
2015 Nov 12
1
systemd unit to start Samba as AD DC
...tent ------------------------------------------------------------------------------------ [Unit] Description=Samba Active Directory Services Documentation=man:samba(8) After=network.target [Service] Type=forking PIDFile=/var/run/samba/samba.pid LimitNOFILE=16384 EnvironmentFile=-/etc/default/samba ExecStartPre=-/usr/bin/mkdir /var/run/samba ExecStart=/usr/sbin/samba -D -M standard ExecReload=/usr/bin/kill -HUP $MAINPID #FailureAction= [Install] WantedBy=multi-user.target ------------------------------------------------------------------------------------ I start from https://dev.tranquil.it/wiki/SAMBA...
2017 May 04
0
running tomcat as non-root user.. (/var/run pidfile issue)
...rite to /var/run as a non-root user to drop a pidfile.. If I > create a directory in /var/run owned by my user, it gets wiped out > on reboot. > > Ive searched and found this > > https://blog.hqcodeshop.fi/archives/93-Handling-varrun-with-systemd.html > > which says to use ExecStartPre to fudge creating directories in > /var/run so what non-root users can write there.. > > Is that the suggested way to do this? It seems awful kludgey. There are a couple of systemd-ish ways to handle this: tmpfiles or within the tomcat service file. The canonical method is to drop a co...
2018 Aug 08
0
systemd equivalent of xinetd 'only_from' and 'banner_fail' attributes
...) > > Does anyone know how to limit the remote hosts that can connect to a > port with CentOS 7's systemd ? > > Also, how to implement the equivalent of 'banner_fail' ? (not absolutely > required, but nice to have) I managed to do what is needed by creating a simple ExecStartPre script that checks if the $REMOTE_ADDR env var is in a list of my 'only_from' IP addresses - and exits with zero if it is or exits with non-zero if not The non-zero status from the ExecStartPre script causes the whole service instance to fail The ExecStartPre script also writes my '...
2015 Sep 09
0
Report on Xen-4.6rc2 from virt7-xen-46-candidate
...nding > unit-file: > > [root at xencen7ws ~]# systemctl status xenstored > xenstored.service - The Xen xenstore > Loaded: loaded (/usr/lib/systemd/system/xenstored.service; disabled) > Active: active (running) since Tue 2015-09-08 23:13:43 CEST; 13min ago > Process: 757 ExecStartPre=/bin/mkdir -p /var/run/xen (code=exited, > status=0/SUCCESS) > Process: 753 ExecStartPre=/bin/rm -f /var/lib/xenstored/tdb* (code=exited, > status=0/SUCCESS) > Process: 740 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities > (code=exited, status=0/SUCCESS) > Main PID...
2017 Mar 14
3
Relaiable ssh tunnel via systemd
...nnel vis systemd. This is the unit configuration file: {{{ [Unit] Description=Tunnel For %i After=network.target [Service] User=autossh ExecStart=/usr/bin/ssh -o "ExitOnForwardFailure yes" -o "ServerAliveInterval 60" -N -R 40443:installserver:40443 -R 8080:installserver:8080 ExecStartPre=-/usr/bin/ssh tunnel@%i "for pid in $$(ps -u tunnel | grep sshd| cut -d' ' -f1); do kill -9 $$pid; echo kill old ssh process p Restart=always RestartSec=5s StartLimitInterval=0 [Install] WantedBy=multi-user.target }}} Unfortunately on some hosts we see this warning again and again:...
2017 Jul 28
0
vncserver died
...loaded (/etc/systemd/system/vncserver at .service; enabled; vendor preset: disabled) Active: failed (Result: resources) since Fri 2017-07-28 13:31:15 EDT; 54s ago Process: 19173 ExecStart=/usr/sbin/runuser -l root -c /usr/bin/vncserver %i (code=exited, status=0/SUCCESS) Process: 19170 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS) Jul 28 13:31:12 homebase.home.htt systemd[1]: Starting Remote desktop service (VNC)... Jul 28 13:31:15 homebase.home.htt systemd[1]: PID file /home/root/.vnc/homebase.home.htt:3.pid not readab...
2018 Jun 09
3
Problem with named.service
...18-06-09 07:12:50 AST; 1min 17s ago  Process: 2822 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)  Process: 2863 ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS (code=exited, status=0/SUCCESS)  Process: 2859 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=0/SUCCESS) Main PID: 2864 (named)   CGroup: /system.slice/named.service           ...
2018 Oct 10
2
Samba server fails to save settings
...I have checked the state of samba which clearly shows it is up and running as below: ● smb.service - Samba SMB Daemon Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2018-10-10 16:21:29 BST; 2min 6s ago Process: 1570 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS) Main PID: 1574 (smbd) Status: "smbd: ready to serve connections..." Tasks: 4 (limit: 4915) CGroup: /system.slice/smb.service ├─1574 /usr/sbin/smbd --foreground --no-process-group...
2017 May 15
1
centos 7- boot doesn't wait for startup script to complete
Hello,Nothing I have found has solved this issue.? the service starts on boot, but the booting process continues.? When I log in my startup script is still running and finishes up.? that is good at least, but I'd still like to know how to make it wait. Any feedback is appreciated. Thanks in advance.KM From: KM <info4km at yahoo.com> To: CentOS mailing list <centos at
2016 Mar 15
0
Centos 7: Problem with named-chroot service after last update
.... > mar 15 10:26:33 s-virt.mydom.local bash[3263]: _default/0.168.192.in- > addr.arpa/IN: file not found All file into /var/named/chroot/var/named/ are not found After investigate I have found this error, into file: ? /etc/systemd/system/multi-user.target.wants/named-chroot.service the?ExecStartPre named-checkconf command is wrong: the option '-t /var/named/chroot' is missing. Solution: Add '-t /var/named/chroot' option before the '-z' option into ExecStartPre command or disable zone check via /etc/sysconfig/named Hope this help -- Dario Lesca (inviato dal mio Lin...
2017 May 04
1
running tomcat as non-root user.. (/var/run pidfile issue)
Am 04.05.2017 um 18:35 schrieb Paul Heinlein: > The second method is to add an ExecStartPre to > /usr/lib/systemd/system/tomcat.service, e.g., Sorry, no. Better not touch the service files in /usr/lib/systemd/system which ship with the associated packages. You create user custom service files in /etc/systemd/system/. Easiest by "systemctl edit foo.service". Alexander
2020 Mar 17
2
Xorg on CentOS
I am trying to find a way to tell the ORDER of X drivers. I have a VM image of CentOS 7. If I boot the image I want the generic driver to load. But if I put that image on hardware I want the Intel driver to load. So if I specific the /etc/X11/xorg.conf.d/20-intel.conf and specify Intel - this is great for the physical device. But booting my image it fails cause there is not Intel hardware.
2020 Mar 17
0
Xorg on CentOS
...specify Intel - > this is great for the physical device. But booting my image it fails cause > there is not Intel hardware. > > How can have ONE X config that specifies Intel first and if not present > load generic VGA stuff. > Thanks, You could write a display-manager.service ExecStartPre script that copies/removes the required file(s) to/from /etc/X11/xorg.conf.d/ depending on the hardware it finds? i.e. create a file like /etc/systemd/system/display-manager.service.d/hardware.conf containing: [Service] ExecStartPre=-/path/to/my/custom/hardware/script I do something simil...
2018 Jun 09
0
Problem with named.service
...2018-06-09 10:00:53 AST; 27s ago   Process: 1821 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)   Process: 2022 ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS (code=exited, status=0/SUCCESS)   Process: 2018 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=0/SUCCESS)  Main PID: 2023 (named)    CGroup: /system.slice/named.service         ...
2017 Nov 24
2
Samba 4.7.1 Switching from SAMBA_INTERNAL to BIND_DLZ failed
...Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2017-11-24 21:58:41 WAT; 4min 10s ago Process: 9321 ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS (code=exited, status=1/FAILURE) Process: 9318 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=0/SUCCESS) Main PID: 8949 (code=exited, status=0/SUCCESS) Nov 24 21:58:41 testdc...
2016 Dec 20
1
CentOS 7 and systemd: SysV initscript: how detect boot vs. interactive use?
...> >Well, the first thing I'd do is make the service wait for the network >to be online. In the [Unit] section add Wants=network-online.target. > >Secondly, I'd try to find a way for the auxiliary services to ping the >prime service to ensure its up, and make that script a ExecStartPre >entry in the [Service] section. You'll want to adjust the >TimeoutStartSec in case it might exceed the DefaultTimeoutStartSec in >/etc/systemd/system.conf, which is 90 seconds. Thank you for the idea, but as mentioned, the same service runs on a mix of server platforms and distros,...
2019 Jun 19
4
Postgrey not working
...go Docs: man:postgrey(8) Process: 5228 ExecStart=/usr/sbin/postgrey --unix=/var/spool/postfix/postgrey/socket --pidfile=/var/run/postgrey.pid --group=postgrey --user=postgrey --greylist-text=Greylisted for %%s seconds --daemonize $POSTGREY_OPTS (code=exited, status=0/SUCCESS) Process: 5225 ExecStartPre=/bin/rm -f /var/run/postgrey.pid (code=exited, status=0/SUCCESS) Main PID: 5229 (/usr/sbin/postg) CGroup: /system.slice/postgrey.service ??5229 /usr/sbin/postgrey --unix=/var/spool/postfix/postgrey/socket --pidfile=/var/run/p... juin 19 09:39:03 sd-100246 systemd[1]: Starting Postfi...