diff --git a/enable.sh b/enable.sh new file mode 100644 index 0000000..b605138 --- /dev/null +++ b/enable.sh @@ -0,0 +1,3 @@ +#!/bin/sh +sudo systemctl enable certrenew.service certrenew.timer certrenew.path +sudo systemctl start certrenew.service certrenew.timer certrenew.target certrenew.path diff --git a/setup.sh b/setup.sh index 2f8941e..55c6dc1 100644 --- a/setup.sh +++ b/setup.sh @@ -14,3 +14,10 @@ Next step: (2) $ sudo systemctl enable certrenew.service certrenew.timer certrenew.path (3) $ sudo systemctl start certrenew.service certrenew.timer certrenew.target certrenew.path EOF + +if [ -z "$EDITOR" ]; then + for EDITOR in vim vi nano ""; do + if command -v "$EDITOR" &>/dev/null; then break; fi + done +fi +[ -z "$EDITOR" ] || "$EDITOR" "$dst/certrenew.service"