From 815a94546cbca5ae498e67d868a50e3a86607980 Mon Sep 17 00:00:00 2001 From: Dan Date: Sun, 23 Jan 2022 16:30:46 +1300 Subject: [PATCH] updated readme --- README.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b99a9b..d418720 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,62 @@ # local-arch-repo -Running multiple Arch devices? Create your own package archive repository. +Running multiple Arch devices? Create your own package archive repository. +This is actually for a pinephone and other x86_64 Arch devices. Probably PIs (armv7l) will follow. + +# Usage + +## Packages +``` +sudo pacman -S rsync +``` + +## Webserver + +### Nginx +Add this to you webserver. +``` +server { + listen 8080; + server_name SERVER_IP; + + location / { + root /srv/http/repo/; + autoindex on; + } +} +``` + +### python +``` +cd /srv/http/repo/ +python -m http.server +``` + +### darkhttpd +``` +sudo -u http darkhttpd /srv/http/repo/ --no-server-id +``` + +## (Optional) Crontab -e +Packages older than half a year will be deleted. +``` +@monthly find /srv/http/repo/* -mtime +182.5 '!' -regex '*pkg*' -exec rm {} \; +``` + +## Server +``` +git clone https://github.com/TECH-SAVIOURS-ORG/local-arch-repo.git +cd local-arch-repo +sudo ./server.sh +``` + +## Client +``` +git clone https://github.com/TECH-SAVIOURS-ORG/local-arch-repo.git +cd local-arch-repo +sudo ./client.sh +``` + +## Test it +``` +/root/archive_packages.sh +``` \ No newline at end of file