summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrebs <krebs@fuerkrebs>2011-10-20 08:34:23 -0400
committerkrebs <krebs@fuerkrebs>2011-10-20 08:34:23 -0400
commit29b328140d294d9f688f562f1da5115fe2d57d4c (patch)
tree94b2b68505d0a02f66a30f66231713708c744682
parent02970ae5b7bbf7be95e46b4370be0e0388e31b12 (diff)
parent6dee2fbae4b6ec96853bf2f6cef9aeb72db13b25 (diff)
Merge branch 'master' of github.com:krebscode/painload
-rw-r--r--retiolum/Makefile3
-rw-r--r--retiolum/hosts/kremium (renamed from retiolum/hosts/kremu)0
-rwxr-xr-xutil/bin/magic20
3 files changed, 22 insertions, 1 deletions
diff --git a/retiolum/Makefile b/retiolum/Makefile
index 83c4ac12..effdbfb8 100644
--- a/retiolum/Makefile
+++ b/retiolum/Makefile
@@ -22,7 +22,8 @@ update: hosts
@echo adding hosts
bin/update_tinc_hosts restart
@echo reloading tincd
- pkill -HUP tincd || true
+ sudo pkill -HUP tincd || true
+ sudo pkill -ALRM tincd || true
arch-install: update install arch-autostart autohosts
diff --git a/retiolum/hosts/kremu b/retiolum/hosts/kremium
index 06df489f..06df489f 100644
--- a/retiolum/hosts/kremu
+++ b/retiolum/hosts/kremium
diff --git a/util/bin/magic b/util/bin/magic
index d3e86120..cb9cee6e 100755
--- a/util/bin/magic
+++ b/util/bin/magic
@@ -35,13 +35,33 @@ destroy() {
echo "$cache" | sed "/^$bs$/,/^$es$/d" >$3
fi
}
+help() {
+cat <<EOF
+Usage: $0 DELIMITER_NAME FUNCTION FILE
+$0 creates,updates or destroys magic inside a file.
+It can be used to reliably add or remove custom lines.
+For example add own lines in /etc/rc.local to auto-load
+scripts.
+FUNCTION:
+ create -- creates new magic in file, takes stdin as content in magic
+ update -- updates already existing magic with text from stdin
+ destroy -- destroys magic boundary
+ retrieve -- retrieve the content of magic and writes to stdout
+
+Not yet implemented is the handling of magic not starting with the
+shell comment symbol "#".
+
+EOF
+
+}
case $2 in
(create) create "$@" ;;
(retrieve) retrieve "$@" ;;
(update) update "$@" ;;
(destroy) destroy "$@" ;;
(*)
+ help >&2
echo 'Error 1: You are made of stupid!' >&2
exit 23
esac