mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Check if RCDIR exists
This commit is contained in:
parent
da377c6c7f
commit
00fd34f276
11
Makefile
11
Makefile
@ -19,7 +19,8 @@ endif
|
|||||||
ELOGDIR = $(ROOT)$(PREFIX)/elog
|
ELOGDIR = $(ROOT)$(PREFIX)/elog
|
||||||
DESTDIR = $(ROOT)$(PREFIX)/bin
|
DESTDIR = $(ROOT)$(PREFIX)/bin
|
||||||
SDESTDIR = $(ROOT)$(PREFIX)/sbin
|
SDESTDIR = $(ROOT)$(PREFIX)/sbin
|
||||||
RCDIR = $(ROOT)/etc/rc.d/init.d
|
#RCDIR = $(ROOT)/etc/rc.d/init.d
|
||||||
|
RCDIR = $(ROOT)/etc/init.d
|
||||||
|
|
||||||
# flag for SSL support
|
# flag for SSL support
|
||||||
USE_SSL = 1
|
USE_SSL = 1
|
||||||
@ -218,10 +219,14 @@ ifeq ($(OSTYPE),darwin)
|
|||||||
@echo The elogd service can now be started with
|
@echo The elogd service can now be started with
|
||||||
@echo " sudo launchctl load /Library/LaunchDaemons/ch.psi.elogd.plist"
|
@echo " sudo launchctl load /Library/LaunchDaemons/ch.psi.elogd.plist"
|
||||||
else
|
else
|
||||||
|
@if [ ! -d $(RCDIR) ]; then \
|
||||||
|
echo "Directory $(RCDIR) not found, no init script installed" ; \
|
||||||
|
exit 1 ; \
|
||||||
|
fi
|
||||||
|
|
||||||
@sed "s#\@PREFIX\@#$(PREFIX)#g" elogd.init_template > elogd.init
|
@sed "s#\@PREFIX\@#$(PREFIX)#g" elogd.init_template > elogd.init
|
||||||
@mkdir -p -m 0755 $(RCDIR)
|
|
||||||
@if [ ! -f $(RCDIR)/elogd ]; then \
|
@if [ ! -f $(RCDIR)/elogd ]; then \
|
||||||
@$(INSTALL) -v -m 0755 elogd.init $(RCDIR)/elogd ; \
|
$(INSTALL) -v -m 0755 elogd.init $(RCDIR)/elogd ; \
|
||||||
fi
|
fi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user