Browse Source

Add install makefile.

Félix Baylac-Jacqué 6 years ago
parent
commit
91a15eb719
2 changed files with 17 additions and 1 deletions
  1. 17 0
      Makefile
  2. 0 1
      todo.txt

+ 17 - 0
Makefile

@@ -0,0 +1,17 @@
+.POSIX
+
+DIST = /usr/sbin
+CONF = /etc/wireguard
+
+install:
+	cp -f wireguardCreate $(DIST)/create_new_wireguard_account
+	chmod 100 $(DIST)/create_new_wireguard_account
+	if [ ! -f $(CONF)/wg-create-account.ini ]; \
+		then cp wg-create-account.ini.sample $(CONF)/wg-create-account.ini && \
+		echo "Conf file sample created at $(CONF); please fill it up."; \
+	fi;
+
+uninstall:
+	rm -f $(DIST)/create_new_wireguard_account
+
+.PHONY: install uninstall

+ 0 - 1
todo.txt

@@ -1,4 +1,3 @@
 TODO
 
-- Write proper makefile to distribute.
 - Expose config via CLI flags.