package/tor: Install default config and systemd .service file
authorMario Lang <mlang@blind.guru>
Wed, 6 Dec 2017 11:09:06 +0000 (12:09 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 6 Dec 2017 22:05:18 +0000 (23:05 +0100)
Signed-off-by: Mario Lang <mlang@blind.guru>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/tor/tor.mk

index 6a42dbce5366fe5263c752074b968a044945448c..925e4d8f0904cc417c768059cd5fb5f88ac60cbf 100644 (file)
@@ -47,4 +47,16 @@ endif
 # uses gnu extensions
 TOR_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
 
+define TOR_INSTALL_CONF
+       $(INSTALL) -D -m 644 $(@D)/src/config/torrc.minimal \
+               $(TARGET_DIR)/etc/tor/torrc
+endef
+
+TOR_POST_INSTALL_TARGET_HOOKS += TOR_INSTALL_CONF
+
+define TOR_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 644 $(@D)/contrib/dist/tor.service \
+               $(TARGET_DIR)/usr/lib/systemd/system/tor.service
+endef
+
 $(eval $(autotools-package))