diff --git a/misc/README b/misc/README index 25f35198792c6848fbe2ade315208f782e1d16cb..f5881006ee0364719c910e7c32efa58b7b99dbe1 100644 --- a/misc/README +++ b/misc/README @@ -7,5 +7,8 @@ The work around is to run the ioc as root user. A special systemd service has be The systemd service specification should be placed in the root file system under /etc/systemd/system/ -To reload systemd services run: systemctl daemon-reload +To enable the service from boot, specify path to your rootfs e.g. +systemctl --root=/export/nfsroots/ifc1210/rootfs-NEW/ enable emu-lebt + +To reload systemd services and start on already running system: systemctl daemon-reload To start the ioc: systemctl start emu-lebt diff --git a/misc/emu-lebt.service b/misc/emu-lebt.service index f0e1b27fa3e58e5ffce11b729add59f9d94da4fb..2b8d377e516d40cafd91e177690c1361e3c45150 100644 --- a/misc/emu-lebt.service +++ b/misc/emu-lebt.service @@ -2,9 +2,12 @@ Description=IOC: emu-lebt After=rc-local.service +[Install] +WantedBy=multi-user.target + [Service] User=root - + # Only execute IOC if st.cmd exists AssertPathExists=/opt/startup/ioc/VME_EMU-iamspecial/emu/st.cmd @@ -16,4 +19,4 @@ ExecStartPre=/bin/chown -R ioc:ioc /var/run/procServ/emu EnvironmentFile=/opt/startup/ioc/VME_EMU-iamspecial/emu/env.sh # Run procServ with user ioc -ExecStart=/usr/bin/procServ --allow -f -L /var/log/procServ/out-emu -i ^C^D -c /var/run/procServ/%i ${PROCSERV_PORT} ${EPICS_MODULES_PATH}/environment/${ENVIRONMENT_VERSION}/${BASE}/bin/${EPICS_HOST_ARCH}/iocsh /opt/startup/ioc/VME_EMU-iamspecial/%i/st.cmd -n emu +ExecStart=/usr/bin/procServ --allow -f -L /var/log/procServ/out-emu -i ^C^D -c /var/run/procServ/emu ${PROCSERV_PORT} ${EPICS_MODULES_PATH}/environment/${ENVIRONMENT_VERSION}/${BASE}/bin/${EPICS_HOST_ARCH}/iocsh /opt/startup/ioc/VME_EMU-iamspecial/emu/st.cmd -n emu