commit d0de3a630a103c5bae4b251b8e03396e18851314 map588 <map588@pitt.edu> 2026-09-27 02:14:20 -0400 Fix openrc, html and for-array templates openrc.init had a comment between backslash-continued lines, which broke the command, and a leftover i2pd service name. The html template used &head and &nav where every other template uses <++>. for-array kept an example argument list in the body; it is now a Test comment.
html/template.html | 3 +-- openrc.init | 40 +++++++++++++++++++--------------------- sh/for-array | 3 ++- 3 files changed, 22 insertions(+), 24 deletions(-)
diff --git a/html/template.html b/html/template.html index 8a2658b..117a4e0 100644 --- a/html/template.html +++ b/html/template.html @@ -1,13 +1,12 @@ <!DOCTYPE html> <html> <head> -&head +<++> <link rel="stylesheet" href="style.css" /> <meta name="description" content="<++>"> <title><++></title> </head> <body> -&nav <++> </body> </html> diff --git a/openrc.init b/openrc.init index 712cc7f..4529272 100644 --- a/openrc.init +++ b/openrc.init @@ -1,36 +1,34 @@ #!/sbin/openrc-run +# OpenRC service script -command="" # absolute path -command_args="" # pid file, run as daemon +command="<++>" # absolute path +command_args="<++>" # pid file, run as daemon # command_background="yes" # if you can't run as daemon natively # pidfile="/run/$RC_SVCNAME.pid" # if you can get one from the command/want to be able to stop it with pid signals depend() { - # Depends on hitch or another reverse proxy with TLS - # Depends on a cache/gzipping program such as varnish - # add as required - #need X X X - #want X X X - #use X X X - #provide X - # will start immediately before/after something else (prevents parallelisation) - #before X - #after x + # add as required + need <++> + #want <++> + #use <++> + #provide <++> + # will start immediately before/after something else (prevents parallelisation) + #before <++> + #after <++> } start() { - ebegin "Starting i2pd" - start-stop-daemon \ - --start \ - # set the name - --name NAME # --ionice 2:7 --nicelevel 12 # example nice levels. - --exec "$command" \ - -- $command_args + ebegin "Starting <++>" + # --ionice 2:7 --nicelevel 12 # example nice levels + start-stop-daemon \ + --start \ + --name <++> \ + --exec "$command" \ + -- $command_args eend $? } - stop() { - start-stop-daemon --stop --quiet --pidfile "/run/$RC_SVCNAME.pid" + start-stop-daemon --stop --quiet --pidfile "/run/$RC_SVCNAME.pid" } diff --git a/sh/for-array b/sh/for-array index fa27469..ffabaef 100644 --- a/sh/for-array +++ b/sh/for-array @@ -7,8 +7,9 @@ save () { } old=$(save "$@") +set -- <++> myarray=$(save "$@") -set -- foo bar baz boo eval "set -- $myarray" for i ; do <++> ; done eval "set -- $old" +# Test: set -- foo bar baz boo