Moved and split install of main example config file

This commit is contained in:
Olof hagsand 2023-11-02 17:25:11 +01:00
parent 16a7fa3837
commit c703e89bc8
4 changed files with 16 additions and 26 deletions

View file

@ -171,12 +171,13 @@ clean:
distclean: clean
rm -f Makefile *~ .depend
install: $(YANGSPECS) $(CLISPECS) $(PLUGINS) $(APPNAME).xml
install: $(YANGSPECS) $(CLISPECS) $(PLUGINS) $(APPNAME).xml restconf.xml autocli.xml
[ -n "$$(getent group "$(CLICON_GROUP)")" ] || groupadd "$(CLICON_GROUP)"
[ -n "$$(getent passwd "$(CLICON_USER)")" ] || useradd -M -s /usr/sbin/nologin -g "$(CLICON_GROUP)" "$(CLICON_USER)"
install -d -m 0755 $(DESTDIR)$(sysconfdir)
install -m 0644 $(APPNAME).xml $(DESTDIR)$(sysconfdir)
# install -m 0644 $(APPNAME).xml $(DESTDIR)$(CLIXON_DEFAULT_CONFIG)
install -d -m 0755 $(DESTDIR)$(sysconfdir)/clixon
install -m 0644 $(APPNAME).xml $(DESTDIR)$(sysconfdir)/clixon
install -m 0644 autocli.xml $(DESTDIR)$(sysconfdir)/clixon
install -m 0644 restconf.xml $(DESTDIR)$(sysconfdir)/clixon
install -d -m 0755 $(DESTDIR)$(datarootdir)/$(APPNAME)/yang
install -d -m 0755 $(DESTDIR)$(YANG_INSTALLDIR)
install -m 0644 $(YANGSPECS) $(DESTDIR)$(YANG_INSTALLDIR)
@ -196,7 +197,7 @@ endif
install -d -m 0775 -g $(CLICON_GROUP) $(DESTDIR)$(localstatedir)/run # This is for PID and SOCK
uninstall:
rm -rf $(DESTDIR)$(sysconfdir)/$(APPNAME).xml
rm -rf $(DESTDIR)$(sysconfdir)/clixon
rm -rf $(DESTDIR)$(datarootdir)/$(APPNAME)
rm -rf $(DESTDIR)$(localstatedir)/$(APPNAME)
rm -rf $(DESTDIR)$(libdir)/$(APPNAME)