search for: remainafterexit

Displaying 20 results from an estimated 43 matches for "remainafterexit".

2019 Feb 07
2
systemd
Hi All - I have a systemd service file to start my application. Part of my service file is: [Service] Type=forking ExecStart=/path to start ExecStop=/path to stop RemainAfterExit=yes This works fine "normally". However - when I do a "yum update; and reboot" my script detects a kernel change and now does a number of "recompiling" steps for drivers and such before starting my application. Somewhere along the way that just stops. I'm half w...
2018 Jan 05
4
VM migration upon shutdown in centos 7
...######## vPreShutdownHook.service ############### [Unit] Description=vPreShutdownHook Requires=network.target Requires=libvirtd.service Requires=dbus.service Requires=glusterd.service Requires=glusterfsd.service DefaultDependencies=no Before=shutdown.target reboot.target [Service] Type=oneshot RemainAfterExit=true ExecStart=/bin/true ExecStop=/root/vm_migrate.sh [Install] WantedBy=multi-user.target ########## Command to migrate ############ /usr/bin/virsh migrate --verbose --p2p --tunneled --live --compressed --comp-methods "mt" --comp-mt-level 5 --comp-mt-threads 5 --comp-mt-dthreads 5...
2016 Aug 04
3
centos 7- boot doesn't wait for startup script to complete
...to complete On Tue, Aug 02, 2016 at 12:56:21PM +0000, KM wrote: > # used to set up the Myservices onstartup > [Unit] > Description=Start and stop Myservices > > [Service] > Type=oneshot > ExecStart=/etc/init.d/Myservices start > ExecStop=/etc/init.d/Myservices stop > RemainAfterExit=yes > > [Install] > WantedBy=multi-user.target Reformatting so it is readable. What you probably want to do is to add something to the [Unit] section to make the completion of the be a requirement for the user login service.? Something like: Before=systemd-user-sessions.service You wil...
2018 Feb 02
2
Problem with CentOS package for 2.3.0 and old dependency in systemd with clean install
...t dovecot' it breaks with a dependency error which comes from dovecot-init.service. dovecot-init.service : [Unit] Description=One-time Dovecot init service ConditionPathExists=|!/var/lib/dovecot/ssl-parameters.dat ConditionPathExists=|!/etc/pki/dovecot/certs/dovecot.pem [Service] Type=oneshot RemainAfterExit=no ExecStart=/bin/sh -c '\ if [ ! -f /etc/pki/dovecot/certs/dovecot.pem ]; \ then\ ? SSLDIR=/etc/pki/dovecot/ OPENSSLCONFIG=/etc/pki/dovecot/dovecot-openssl.cnf /usr/libexec/dovecot/mkcert.sh /dev/null 2>&1;\ fi;\ if [ ! -f /var/lib/dovecot/ssl-parameters.dat ]; \ then\ ? /usr/libexec/do...
2017 Mar 12
2
How rc-local.service works?
Hi, Let me cite the service file here: [Unit] Description=/etc/rc.d/rc.local Compatibility ConditionFileIsExecutable=/etc/rc.d/rc.local After=network.target [Service] Type=forking ExecStart=/etc/rc.d/rc.local start TimeoutSec=0 RemainAfterExit=yes I basically don't understand two things here: 1. What makes it run? Sure, when I make /etc/rc.d/rc.local executable, it runs. But for all I know, for it to run some other service must pull in it as a dependency. Am I wrong? 2. Why Type=forking? Thanks in advance. Regards, Yuri
2016 Aug 02
2
centos 7- boot doesn't wait for startup script to complete
...using on CentOS 7.? I got it to run by creating the systemd service file... a simple one as shown below, for Myservices. # used to set up the Myservices onstartup[Unit]Description=Start and stop Myservices[Service]Type=oneshotExecStart=/etc/init.d/Myservices startExecStop=/etc/init.d/Myservices stopRemainAfterExit=yes[Install]WantedBy=multi-user.targetThis works. When the server starts Myservices is initiated.? However the boot keeps going. When I log in Myservices is still running.? it takes about 5 minutes to complete.? This is normal.? What is different is the boot up used to wait for the service to finis...
2018 Jan 11
0
Re: VM migration upon shutdown in centos 7
...e the following lines cause systemd to wait for a command to finish: [Service] EnvironmentFile=-/etc/sysconfig/libvirt-guests # Hack just call traditional service until we factor # out the code ExecStart=@libexecdir@/libvirt-guests.sh start ExecStop=@libexecdir@/libvirt-guests.sh stop Type=oneshot RemainAfterExit=yes StandardOutput=journal+console TimeoutStopSec=0 > > > > On Wed, Jan 10, 2018 at 8:46 PM, Michal Privoznik <mprivozn@redhat.com> > wrote: > >> On 01/05/2018 12:00 PM, Raman Gupta wrote: >>> Hi, >>> >>> I have CentOS 7, two node syste...
2015 Jan 16
4
shutdown -h doesn't
I've got a fresh CentOS 7 test machine, fully patched. The command: shutdown -h now surprisingly does not halt the machine. Instead it reboots it. WTF? I found the following Debian discussion which seems to be the same issue: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766338> However, removing kexec-tools in this case did not solve the problem. Nor does
2018 Feb 14
1
Problem with CentOS package for 2.3.0 and old dependency in systemd with clean install
...>> >> dovecot-init.service : >> [Unit] >> Description=One-time Dovecot init service >> ConditionPathExists=|!/var/lib/dovecot/ssl-parameters.dat >> ConditionPathExists=|!/etc/pki/dovecot/certs/dovecot.pem >> >> [Service] >> Type=oneshot >> RemainAfterExit=no >> ExecStart=/bin/sh -c '\ >> if [ ! -f /etc/pki/dovecot/certs/dovecot.pem ]; \ >> then\ >> SSLDIR=/etc/pki/dovecot/ >> OPENSSLCONFIG=/etc/pki/dovecot/dovecot-openssl.cnf >> /usr/libexec/dovecot/mkcert.sh /dev/null 2>&1;\ >> fi;\ >> if [...
2018 Feb 15
1
Problem with CentOS package for 2.3.0 and old dependency in systemd with clean install
...ervice : >>> [Unit] >>> Description=One-time Dovecot init service >>> ConditionPathExists=|!/var/lib/dovecot/ssl-parameters.dat >>> ConditionPathExists=|!/etc/pki/dovecot/certs/dovecot.pem >>> >>> [Service] >>> Type=oneshot >>> RemainAfterExit=no >>> ExecStart=/bin/sh -c '\ >>> if [ ! -f /etc/pki/dovecot/certs/dovecot.pem ]; \ >>> then\ >>> SSLDIR=/etc/pki/dovecot/ >>> OPENSSLCONFIG=/etc/pki/dovecot/dovecot-openssl.cnf >>> /usr/libexec/dovecot/mkcert.sh /dev/null 2>&1;\ &gt...
2016 Sep 07
2
[SOLVED] Re: Feature Request: what about "core stop panic" ?
...et nss-lookup.target local-fs.target remote-fs.target dahdi.service misdn.service lcr.service wanrouter.service mysql.service postgresql.service Wants=network-online.target Conflicts=shutdown.target [Service] Type=forking Restart=no TimeoutSec=5min IgnoreSIGPIPE=no KillMode=process GuessMainPID=no RemainAfterExit=yes SysVStartPriority=2 ExecStart=/etc/init.d/asterisk start ExecStop=/etc/init.d/asterisk stop ExecReload=/etc/init.d/asterisk reload My /etc/init.d/asterisk file is sourcing my /etc/default/asterisk which includes an (uncommented) line COREDUMP=yes. I also have # grep core /etc/asterisk/asteris...
2018 Jan 12
1
Re: VM migration upon shutdown in centos 7
...for a command to finish: > > [Service] > EnvironmentFile=-/etc/sysconfig/libvirt-guests > # Hack just call traditional service until we factor > # out the code > ExecStart=@libexecdir@/libvirt-guests.sh start > ExecStop=@libexecdir@/libvirt-guests.sh stop > Type=oneshot > RemainAfterExit=yes > StandardOutput=journal+console > TimeoutStopSec=0 > > > > > > > > > On Wed, Jan 10, 2018 at 8:46 PM, Michal Privoznik <mprivozn@redhat.com> > > wrote: > > > >> On 01/05/2018 12:00 PM, Raman Gupta wrote: > >>> Hi, > &gt...
2016 Aug 09
1
centos 7- boot doesn't wait for startup script to complete
...at 12:56:21PM +0000, KM wrote: >> # used to set up the Myservices onstartup >> [Unit] >> Description=Start and stop Myservices >> >> [Service] >> Type=oneshot >> ExecStart=/etc/init.d/Myservices start >> ExecStop=/etc/init.d/Myservices stop >> RemainAfterExit=yes >> >> [Install] >> WantedBy=multi-user.target > > Reformatting so it is readable. > > What you probably want to do is to add something to the [Unit] section > to make the completion of the be a requirement for the user login > service.? Something like: &gt...
2016 Feb 04
3
A question about Samba logging
Hi May I ask for help with this again please? I’m trying to ensure that Samba writes its wins.dat file to tmpfs. I have added these mount commands to /etc/init.d/samba: case $1 in start) mount -t tmpfs tmpfs /var/run/samba mount -t tmpfs tmpfs /var/cache/samba /etc/init.d/nmbd start /etc/init.d/smbd start
2014 Aug 10
3
Centos 7 - iptables service failed to start
...s in when I am trying to execute this from systemd. I wrote /etc/systemd/system/firewall.service with this content: [Unit] Description=Iptables firewall Before=network.target Wants=network.target [Service] Type=oneshot ExecStart=/usr/local/bin/firewall.start ExecStop=/usr/local/bin/firewall.stop RemainAfterExit=yes [Install] WantedBy=multi-user.target Now, when I run systemctl start firewall.service, I get this output: Job for firewall.service failed. See 'systemctl status firewall.service' and 'journalctl -xn' for details. If I do systemctl status firewall.status, it gives me: firewall...
2015 Jan 16
0
shutdown -h doesn't
...e with [Unit] Description=Power-on USB in prep for shutdown [Service] Type=oneshot ExecStart=/bin/sh -c "for i in /sys/bus/usb/devices/*/power/control ; do echo on > \$i ; done" ExecStop=/bin/sh -c "for i in /sys/bus/usb/devices/*/power/control ; do echo on > \$i ; done" RemainAfterExit=yes [Install] WantedBy=poweroff.target but this seems to have no effect. Maybe the "poweroff" target does not really exist. I think someone more experienced with systemd could fix this. HTH, Kay
2015 Jan 16
1
shutdown -h doesn't
...in prep for shutdown > > [Service] > Type=oneshot > ExecStart=/bin/sh -c "for i in /sys/bus/usb/devices/*/power/control ; do > echo on > \$i ; done" > ExecStop=/bin/sh -c "for i in /sys/bus/usb/devices/*/power/control ; do > echo on > \$i ; done" > RemainAfterExit=yes > > [Install] > WantedBy=poweroff.target > > but this seems to have no effect. Maybe the "poweroff" target does not > really exist. I think someone more experienced with systemd could fix this. > > HTH, > > Kay > Forgot to say: the problem does n...
2015 Sep 23
1
Help with systemd
Hi Jonathan, Thanks for the feedback 2.) You're going through a lot of effort to generate a pidfile, when > it's completely unnecesary for systemd services. > > I tried not using a pidfile initially and this that case things would start up and run correctly for a short period but then systemd would put the service into a failed state and kill it off. Based on the documentation
2016 Aug 02
0
centos 7- boot doesn't wait for startup script to complete
On Tue, Aug 02, 2016 at 12:56:21PM +0000, KM wrote: > # used to set up the Myservices onstartup > [Unit] > Description=Start and stop Myservices > > [Service] > Type=oneshot > ExecStart=/etc/init.d/Myservices start > ExecStop=/etc/init.d/Myservices stop > RemainAfterExit=yes > > [Install] > WantedBy=multi-user.target Reformatting so it is readable. What you probably want to do is to add something to the [Unit] section to make the completion of the be a requirement for the user login service. Something like: Before=systemd-user-sessions.service You wil...
2016 Aug 04
0
centos 7- boot doesn't wait for startup script to complete
...at 12:56:21PM +0000, KM wrote: >> # used to set up the Myservices onstartup >> [Unit] >> Description=Start and stop Myservices >> >> [Service] >> Type=oneshot >> ExecStart=/etc/init.d/Myservices start >> ExecStop=/etc/init.d/Myservices stop >> RemainAfterExit=yes >> >> [Install] >> WantedBy=multi-user.target > > Reformatting so it is readable. > > What you probably want to do is to add something to the [Unit] section > to make the completion of the be a requirement for the user login > service. Something like: &gt...