X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=slicerepo.spec;fp=slicerepo.spec;h=5f24b5a675b58bb5dbc1fe5c9952094bd4e060f1;hb=cb921034218d0783c87207c0b5eab6377f7f9561;hp=86e3cdda9a3048ed263367d06381f5885e48cd57;hpb=7ac37b2106283238e2df601b0c5be59acbf3d0a5;p=nodeimage.git diff --git a/slicerepo.spec b/slicerepo.spec index 86e3cdd..5f24b5a 100644 --- a/slicerepo.spec +++ b/slicerepo.spec @@ -67,7 +67,15 @@ install -D -m 644 %{_topdir}/RPMS/yumgroups.xml $RPM_BUILD_ROOT/var/www/html/ins rm -rf $RPM_BUILD_ROOT %post -service plc start packages +if [ ! -e /bin/systemctl ] ; then + echo "Systemd is not there. Just starting PLC to handle packages (may fail of PLC is not configured) ..." + service plc start packages +elif /bin/systemctl status plc >/dev/null ; then + echo "Restarting PLC to handle packages ..." + service plc restart packages +else + echo "The PLC is not running. Skipping a restart ..." +fi %files %defattr(-,root,root,-)