Re: Startup script for Netbox: can't start with a user and can't stop

2024-07-25 Thread Mik J
--user=_netbox --group=_netbox --config=${_BASEDIR}/gunicorn.py" So that everything is aligned 2) >this doesn't make a lot of sense, why not either start it from the >rc script itself, or save a separate script to disk, rather than >writing to /var/run? >also if you run com

Re: Startup script for Netbox: can't start with a user and can't stop

2024-07-25 Thread Stuart Henderson
EOF >     chmod u+x /var/run/netbox_start >     chmod o+x /var/run/netbox_start > } this doesn't make a lot of sense, why not either start it from the rc script itself, or save a separate script to disk, rather than writing to /var/run? also if you run commands from the venv b

Startup script for Netbox: can't start with a user and can't stop

2024-07-24 Thread Mik J
Hello, I'm trying to write a startup script for an application called netbox (it's an opensource IPAM). I created a user and a group # grep netbox /etc/group _netbox:*:9994: # grep netbox /etc/passwd _netbox:*:9994:9994::/home/netbox:/sbin/nologin And I have this script #!/bin/ksh

Re: Script doesn't stop opensearch

2024-01-04 Thread Omar Polo
On 2024/01/04 19:44:01 +, Mik J wrote: > [...] > I still have a question Omar, you wrote that the pexp content would be matched > "the daemon is found by looking for a process matching that pexp and killing > it." > > Here I have > pexp="$(/usr/local/bin/javaPathHelper -c opensearch) > .*or

Re: Script doesn't stop opensearch

2024-01-04 Thread Mik J
4 janvier 2024 à 14:36:05 UTC+1, Stuart Henderson a écrit : On 2024-01-03, Mik J wrote: > Hello, > > I don't understand how the startup/stop script works It uses the string from pexp (as it was when the daemon was _started_; changes to the rc script after startup are ignored)

Re: Script doesn't stop opensearch

2024-01-04 Thread Stuart Henderson
On 2024-01-03, Mik J wrote: > Hello, > > I don't understand how the startup/stop script works It uses the string from pexp (as it was when the daemon was _started_; changes to the rc script after startup are ignored) with pgrep(1) -xf to identify the running process (and pkill -

Re: Script doesn't stop opensearch

2024-01-04 Thread Stuart Henderson
On 2024-01-04, Mike Fischer wrote: > >> Am 04.01.2024 um 00:06 schrieb Mik J : >> >> However when I want to stop the process >> # /etc/rc.d/opensearch stop >> Nothing happens > > try: > # rcctl stop opensearch > > You are not supposed to ever call the /etc/rc.d/* scripts directly. no, that's fin

Re: Script doesn't stop opensearch

2024-01-04 Thread Omar Polo
On 2024/01/03 23:06:57 +, Mik J wrote: > Hello, > > I don't understand how the startup/stop script works > > # cat /etc/rc.d/opensearch > #!/bin/ksh > > daemon="/usr/local/opensearch/bin/opensearch" > daemon_flags="-d -p /var/run/opense

Re: Script doesn't stop opensearch

2024-01-03 Thread Mike Fischer
> Am 04.01.2024 um 00:06 schrieb Mik J : > > However when I want to stop the process > # /etc/rc.d/opensearch stop > Nothing happens try: # rcctl stop opensearch You are not supposed to ever call the /etc/rc.d/* scripts directly. HTH Mike

Script doesn't stop opensearch

2024-01-03 Thread Mik J
Hello, I don't understand how the startup/stop script works # cat /etc/rc.d/opensearch #!/bin/ksh daemon="/usr/local/opensearch/bin/opensearch" daemon_flags="-d -p /var/run/opensearch/opensearch.pid" daemon_user="_opensearch" . /etc/rc.d/rc.subr pexp=

Re: self-hosted man.openbsd.org script?

2023-12-27 Thread Mihai Popescu
Hello, A very good explanation. All crystal clear now, i thank you for your time. I had a strange idea in the late night about replacing something with something else, but i see it is not the case and there is no need to elaborate. Thank you. On Thu, Dec 28, 2023 at 3:46 AM Ingo Schwarze wrote:

Re: self-hosted man.openbsd.org script?

2023-12-27 Thread Ingo Schwarze
Hi Mihai, Mihai Popescu wrote on Thu, Dec 28, 2023 at 01:32:34AM +0200: > [ removed elaborate instruction about going html from almost txt with > man pages ] > > All this to jump in html boat? Or I got it wrong? > Are old man pages deprecated? Manual pages are not restricted to a specific outpu

Re: self-hosted man.openbsd.org script?

2023-12-27 Thread Alexis
Mihai Popescu writes: [ removed elaborate instruction about going html from almost txt with man pages ] All this to jump in html boat? Or I got it wrong? Are old man pages deprecated? It can be convenient to have Web-based access to the man pages for systems or software that one isn't cu

Re: self-hosted man.openbsd.org script?

2023-12-27 Thread Mihai Popescu
[ removed elaborate instruction about going html from almost txt with man pages ] All this to jump in html boat? Or I got it wrong? Are old man pages deprecated?

Re: self-hosted man.openbsd.org script?

2023-12-26 Thread Ingo Schwarze
Hi Paul, Paul Pace wrote on Sun, Dec 24, 2023 at 05:25:55AM -0800: > I have this vague memory of reading someone who posted a script, IIRC, > to convert the system's man pages to HTML, or similar, into somewhere > under /var/www and the pages worked just like the

Re: self-hosted man.openbsd.org script?

2023-12-24 Thread Alexis
Paul Pace writes: I have this vague memory of reading someone who posted a script, IIRC, to convert the system's man pages to HTML, or similar, into somewhere under /var/www and the pages worked just like the highly useful man.openbsd.org, and not like the plain text pages that eve

Re: self-hosted man.openbsd.org script?

2023-12-24 Thread Nick Holland
On 12/24/23 08:25, Paul Pace wrote: I have this vague memory of reading someone who posted a script, IIRC, to convert the system's man pages to HTML, or similar, into somewhere under /var/www and the pages worked just like the highly useful man.openbsd.org, and not like the plain text pages

Re: self-hosted man.openbsd.org script?

2023-12-24 Thread Theo Buehler
On Sun, Dec 24, 2023 at 05:25:55AM -0800, Paul Pace wrote: > I have this vague memory of reading someone who posted a script, IIRC, to > convert the system's man pages to HTML, or similar, into somewhere under > /var/www and the pages worked just like the highly useful man.openbsd.

Re: self-hosted man.openbsd.org script?

2023-12-24 Thread Otto Moerbeek
On Sun, Dec 24, 2023 at 05:25:55AM -0800, Paul Pace wrote: > I have this vague memory of reading someone who posted a script, IIRC, to > convert the system's man pages to HTML, or similar, into somewhere under > /var/www and the pages worked just like the highly useful man.openbsd.

self-hosted man.openbsd.org script?

2023-12-24 Thread Paul Pace
I have this vague memory of reading someone who posted a script, IIRC, to convert the system's man pages to HTML, or similar, into somewhere under /var/www and the pages worked just like the highly useful man.openbsd.org, and not like the plain text pages that everyone always posts to

rc script won't stop

2023-04-20 Thread Mik J
Openbsd 7.3 Hello, I'm trying to make a startup script for an application called netbox.I'm able to start it but it won't stop I tried thisrc_stop() { #   if [[ -f /var/run/netbox.pid ]]; then   kill `cat /var/run/netbox.pid`   rm /var/run/netbox.pid #  

kshcolor - a script for decorating ksh shell programs and terminals

2023-04-18 Thread Ted Bullock
Hiya folks, As a learning project to teach myself how to use the ksh shell I wrote a helper script to set ansi colors and decorations that I'm calling *kshcolor*. The script is available here for anyone who is intrigued: https://github.com/tbullock/kshcolor The project includes a makefi

Re: Script launcher and a suite of basic scripts for music production?

2023-01-19 Thread Brian Durant
pad as an alternative to a script launcher. The audio side is in many ways more clear cut. I need to be able to record saxophone, voice and bass (I am unfortunately limited to two of these at a time with my current hardware.). The input through the sound card would need to be monitored (when li

Re: Script launcher and a suite of basic scripts for music production?

2023-01-18 Thread Luke A. Call
On 2023-01-18 16:51:28+0100, Brian Durant wrote: > On 1/18/23 11:46, Abhishek Chakravarti wrote: > > Brian Durant writes: > > > The only disadvantage that I can see at this point, is that what I am > > > describing would require a number of open terminals on the desktop, > > > which can be confu

Re: Script launcher and a suite of basic scripts for music production?

2023-01-18 Thread Crystal Kolipe
han rely on the defaults, which might change. Last year I had to fix a problem for a company who were recording VoIP calls on an OpenBSD system with a simple shell script that invoked aucat twice to record the local and remote audio via separate sndio subdevices. (So the resulting file was stereo,

Re: Script launcher and a suite of basic scripts for music production?

2023-01-18 Thread Brian Durant
t that any script is input sensitive and can automatically number files for each input in order for possible playback with effects by using a simple alias created automatically for the purpose, for the session (?) Also important that monitoring is possible during file creation to avoid pa

Re: Script launcher and a suite of basic scripts for music production?

2023-01-18 Thread Abhishek Chakravarti
Hello! Brian Durant writes: > The only disadvantage that I can see at this point, is that what I am > describing would require a number of open terminals on the desktop, > which can be confusing to sort through, particularly during a live > performance. Although not a direct answer to your q

Script launcher and a suite of basic scripts for music production?

2023-01-17 Thread Brian Durant
Is there a script launcher that can be used for basic scripts to facilitate live (or close to live) music performances with OpenBSD? One of the reasons that I am a proponent of using OpenBSD with music, is the fact that much can be done simply, from the command line. Recording audio from a USB

Separating stdout and stderr in an rc.d script

2023-01-12 Thread Ido Perlmuter
Hi there. I'm trying to figure out how to write an rc.d script that doesn't redirect stderr to stdout and send both to logger. Suppose I wanted to keep them separate, and perhaps pipe one (stdout) to a file or another program. How would I go about doing that? I tried figuring tha

System freezes after execution of large script

2022-08-09 Thread Miethe, Martin
[ $USER_ERROR -eq 0 ] then echo "* UPD (183883|dummyuser, dummyuser) ... success" else echo "* UPD (183883| dummyuser, dummyuser) ... failed" fi This chunk of code is repeated maybe 2.000 times, generated twice a day to a script file and run by cron. *Problem* Maybe onc

Re: Request: A script that lists all dependencies to any given package for facilitating offline installations

2022-07-17 Thread Thim Cederlund
On 17/07-22 14:26, Allan Streib wrote: > On Sun, Jul 17, 2022, at 1:32 PM, ha...@tutanota.de wrote: > > > It would be useful to have a function that lists all dependencies. > > You can do this if you install the ports tree, see man 7 ports and > "print-run-depends" > > Also the sqlports package

Re: Request: A script that lists all dependencies to any given package for facilitating offline installations

2022-07-17 Thread Allan Streib
On Sun, Jul 17, 2022, at 1:32 PM, ha...@tutanota.de wrote: > It would be useful to have a function that lists all dependencies. You can do this if you install the ports tree, see man 7 ports and "print-run-depends" Also the sqlports package may help, though I've never used it.

Re: Request: A script that lists all dependencies to any given package for facilitating offline installations

2022-07-17 Thread Stuart Henderson
On 2022-07-17, ha...@tutanota.de wrote: > Please implement it asap. How rude. That is not how things work here. > (it would be very easy, and of huge help) It's not as easy as you seem to think. -- Please keep replies on the mailing list.

Re: Unbound rc script behavior on 7.1

2022-05-31 Thread Stuart Henderson
On 2022-05-29, Georg Pfuetzenreuter wrote: > This is a multi-part message in MIME format. > --ixL2X1ILWFWJlrgqgqUkZvxl > Content-Type: text/plain; charset=UTF-8; format=flowed > Content-Transfer-Encoding: 7bit > > Hi, > > I just installed a fresh copy of OpenBSD 7.1 and copied my worki

Re: Unbound rc script behavior on 7.1

2022-05-29 Thread Maurice McCarthy
Did you miss out # unbound-control-setup perhaps?

[PATCH v2 3/3] script(1): fix exit status wording, use 125 for general failure

2022-01-12 Thread наб
This is a base-line attempt at separating errors from the child from the ones from script itself ‒ 125 is the general-purpose code in POSIX utilities that exec() (with 126 being ENOEXEC and 127 ‒ ENOENT) --- Please keep me in CC, as I'm not subscribed. usr.bin/script/script.1 | 6 ++ us

[PATCH v2 2/3] script(1): simplify shell execution

2022-01-12 Thread наб
Use execl in both paths and the same warn() call --- Please keep me in CC, as I'm not subscribed. usr.bin/script/script.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index 763975d6a..fd2829033 1

[PATCH v2 1/3] script(1): actually bubble child errors

2022-01-12 Thread наб
script.1 says > script will exit with the status of 0 unless any of its child > processes fail, in which case, script will return 1. This is a patent lie: it only exits with 1 if the host or writer processes fail, not the actual child Instead, wait for the child in the writer process and

Re: [PATCH 4/4] script(1): explicitly specify sh -c

2022-01-03 Thread Jason McIntyre
> Agree, this is much better phrasing, cheers. > > > > > > > > -To run a command with arguments, enclose both in quotes. > > > > why do you want to remove this line? the page is short, and it might > > > > help someone. > > > Because the value f

Re: [PATCH 4/4] script(1): explicitly specify sh -c

2022-01-03 Thread наб
d say > > > > > > Run > > > .Nm sh Fl c Ar command , > > > instead of an interactive shell. > > Agree, this is much better phrasing, cheers. > > > > > > -To run a command with arguments, enclose both in quotes. > > > why do y

Re: [PATCH 4/4] script(1): explicitly specify sh -c

2022-01-02 Thread Jason McIntyre
; Agree, this is much better phrasing, cheers. > > > > -To run a command with arguments, enclose both in quotes. > > why do you want to remove this line? the page is short, and it might > > help someone. > Because the value for -c is a *shell script*, not a command

Re: [PATCH 4/4] script(1): explicitly specify sh -c

2022-01-02 Thread наб
y do you want to remove this line? the page is short, and it might > help someone. Because the value for -c is a *shell script*, not a command ‒ I didn't think to change it out ‒ it's much more confusing to have this include mention of arguments when, well, they aren't: this reads a

Re: [PATCH 4/4] script(1): explicitly specify sh -c

2022-01-02 Thread Jason McIntyre
On Sat, Jan 01, 2022 at 11:07:49PM +0100, ?? wrote: > The original wording is weird and doesn't explicitly say that it does > sh -c, which is the fundamental point ??? spell it out directly > --- > usr.bin/script/script.1 | 2 +- > 1 file changed, 1 insertion(+), 1 deletio

[PATCH 1/4] script(1): actually bubble child errors

2022-01-01 Thread наб
script.1 says > script will exit with the status of 0 unless any of its child > processes fail, in which case, script will return 1. This is a patent lie: it only exits with 1 if the host or writer processes fail, not the actual child Instead, wait for the child in the writer process and

[PATCH 2/4] script(1): simplify shell execution

2022-01-01 Thread наб
Use execl in both paths and the same warn() call --- usr.bin/script/script.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index 763975d6a..fd2829033 100644 --- a/usr.bin/script/script.c +++ b/usr.bin

[PATCH 3/4] script(1): fix exit status wording, use 125 for general failure

2022-01-01 Thread наб
This is a base-line attempt at separating errors from the child from the ones from script itself ‒ 125 is the general-purpose code in POSIX utilities that exec() (with 126 being ENOEXEC and 127 ‒ ENOENT) --- usr.bin/script/script.1 | 6 ++ usr.bin/script/script.c | 6 +++--- 2 files changed

[PATCH 4/4] script(1): explicitly specify sh -c

2022-01-01 Thread наб
The original wording is weird and doesn't explicitly say that it does sh -c, which is the fundamental point ‒ spell it out directly --- usr.bin/script/script.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/script/script.1 b/usr.bin/script/script.1 index 2878

Re: cron sh script fork

2021-11-15 Thread Theo de Raadt
Todd C. Miller wrote: > On Mon, 15 Nov 2021 20:13:01 +0300, misc@abrakadabra.systems wrote: > > > [/opt/bin]$ cat check.sh > > #!/bin/sh > > > > _ret=$(ps aux | grep sleeploop.sh | grep -v grep | awk '{print $2}') > > test -z ${_ret} && /opt/bin/sleeploop.sh & > > By default, ps uses 80 columns

Re: cron sh script fork

2021-11-15 Thread Todd C . Miller
On Mon, 15 Nov 2021 20:13:01 +0300, misc@abrakadabra.systems wrote: > [/opt/bin]$ cat check.sh > #!/bin/sh > > _ret=$(ps aux | grep sleeploop.sh | grep -v grep | awk '{print $2}') > test -z ${_ret} && /opt/bin/sleeploop.sh & By default, ps uses 80 columns so the information is probably being cut

Re: cron sh script fork

2021-11-15 Thread Theo de Raadt
Your "ps" pipeline could identify other processes. If I was on your machine, I would start a long-running process with sleeploop.sh as an argument, your script sees it, and misbehaves. Don't do this. man 5 crontab A method to do this safer was -s command

cron sh script fork

2021-11-15 Thread misc
I have one script (sleeploop.sh) running in background and second (check.sh) to test if sleeploop is running and if not then start it. [/opt/bin]$ cat sleeploop.sh #!/bin/sh while true do sleep 5 done [/opt/bin]$ cat

Re: OpenBSD 7.0--cron will not run a certain script

2021-11-12 Thread Jeff Ross
On 11/11/21 4:09 PM, Łukasz Moskała wrote: W dniu 11.11.2021 o 23:55, Jeff Ross pisze: Hi, /bin/sh -x /home/jross/sync_to_odroidn2.sh cat ./sync_to_ordoidn2.sh Looks like you have typo in file name to me :) odroid in first, ordoid in second. Egads.  Thank you!  That was indeed the probl

Re: OpenBSD 7.0--cron will not run a certain script

2021-11-11 Thread Łukasz Moskała
/bin/sh /home/jross/upload_latest.sh 2>&1 *   *   *   *   *   python3 4Kwebcam_loop_no_scp.py 38     *   *   *   *   /bin/sh -x /home/jross/sync_to_odroidn2.sh 2>&1 The first 2 scripts work fine.  The last one absolutely will not.

OpenBSD 7.0--cron will not run a certain script

2021-11-11 Thread Jeff Ross
_latest.sh 2>&1 *   *   *   *   *   python3 4Kwebcam_loop_no_scp.py 38     *   *   *   *   /bin/sh -x /home/jross/sync_to_odroidn2.sh 2>&1 The first 2 scripts work fine.  The last one absolutely will not. Here's the very simple script: jross@pi:/home

Re: IPv6: how to trigger script when address prefix changes?

2021-10-07 Thread Mike Fischer
difference on ≈ 1 and 2 hours). - A new IPv6 address using the new prefix was added to the interface. Note that the IID was completely new, probably caused by the autoconf setting. Also, my test script configured in /etc/hostname.em0 as "!/root/bin/if_log.sh \$if“ does not trigger which con

Re: IPv6: how to trigger script when address prefix changes?

2021-10-06 Thread Daniel Jakots
On Thu, 7 Oct 2021 02:52:13 +0200, Mike Fischer wrote: > Would a IPv6 address prefix change be something the hotplug(4) / > hotplugd(8) mechanism would see? It would rather be ifstated(8), but I don't think so. I've never looked into this, but if I were, I would check the route(8) monitor comman

IPv6: how to trigger script when address prefix changes?

2021-10-06 Thread Mike Fischer
change is happening so why not let it tell my script?) Note that I am not concerned about the temporary IPv6 addresses generated by RFC 8981 privacy settings. Just any addresses using a fixed/static Interface Identifier (IID), either manually configured, EUI-64 or randomly generated. In other

Re: LMTP dovecot timeout when sieve's run script

2021-08-07 Thread pas...@pascallen.nl
Dear Stuart, Thank you. Sometime it's to easy. The quick response with answer says it all. Pascal. signature.asc Description: This is a digitally signed message part

Re: LMTP dovecot timeout when sieve's run script

2021-08-06 Thread Stuart Henderson
On 2021-08-06, pas...@pascallen.nl wrote: > --=-auHtfLlFC+dDT6m6OqcT > Content-Type: text/plain; charset="UTF-8" > Content-Transfer-Encoding: 7bit > > Hallo, > > > Dovecot lmtp is timing out when running a script started from sieve. > This happens when emails

LMTP dovecot timeout when sieve's run script

2021-08-06 Thread pas...@pascallen.nl
Hallo, Dovecot lmtp is timing out when running a script started from sieve. This happens when emails are to big. Have attachments that are to big. How can I change the time out? Output: Jul 1 13:28:55 router dovecot: lmtp(pas...@pascallen.nl)<90734>: Error: program exec:/usr/loc

Re: Git Daemon rc Script Not Stopping

2021-01-06 Thread Alexander Hall
It was merely a hunch. Thinking of it, I believe there is some magic to cope with that. Never mind my likely red herring. /Alexander On January 6, 2021 3:49:46 PM GMT+01:00, ben wrote: >>Without looking too far, check what pgrep gives. My first suspicion is >>the initial space in your 'daemon

Re: Git Daemon rc Script Not Stopping

2021-01-06 Thread ben
>Without looking too far, check what pgrep gives. My first suspicion is >the initial space in your 'daemon_flags'. Why does daemon_flags not permit spaces? rc.subr(8) has no information on including or lack of whitespace in daemon_flags.

Re: Git Daemon rc Script Not Stopping

2021-01-05 Thread Alexander Hall
On Tue, Jan 05, 2021 at 03:19:29PM -0500, ben wrote: > >The original version of this script installed by the port contains > >rc_reload=NO and also uses a very different pexp. > > I checked out the original rc script, and it works. Why didn't my pexp var > work > fo

Re: Git Daemon rc Script Not Stopping

2021-01-05 Thread Stefan Sperling
On Tue, Jan 05, 2021 at 03:19:29PM -0500, ben wrote: > >The original version of this script installed by the port contains > >rc_reload=NO and also uses a very different pexp. > > I checked out the original rc script, and it works. Why didn't my pexp var > work > fo

Re: Git Daemon rc Script Not Stopping

2021-01-05 Thread ben
>The original version of this script installed by the port contains >rc_reload=NO and also uses a very different pexp. I checked out the original rc script, and it works. Why didn't my pexp var work for the script? The term should match the process, and yet the daemon was still running?

Re: Git Daemon rc Script Not Stopping

2021-01-05 Thread Stefan Sperling
On Tue, Jan 05, 2021 at 02:41:51PM -0500, ben wrote: > Hello, Misc; > > I've been playing around with rc.d scripts and I've stumbled upon an issue in > my git daemon script: > > #!/bin/ksh > # > # $OpenBSD: gitdaemon.rc,v 1.4 2019/07/16 09:56:55 st

Git Daemon rc Script Not Stopping

2021-01-05 Thread ben
Hello, Misc; I've been playing around with rc.d scripts and I've stumbled upon an issue in my git daemon script: #!/bin/ksh # # $OpenBSD: gitdaemon.rc,v 1.4 2019/07/16 09:56:55 stsp Exp $ daemon="/usr/local/libexec/git/git-daemon --detach" dae

Re: tmux rc script not stopping

2020-10-10 Thread Ashlen
In retrospect, command -v seems to be more portable than which[1]. So a better version would be: if command -v tmux >/dev/null 2>&1; then # if not inside a tmux session, and if no session is started, start # a new session test -z "$TMUX" && (tmux attach || tmux new-session) fi Though I supp

Re: tmux rc script not stopping

2020-10-10 Thread Ashlen
On 20/10/07 02:34PM, ben wrote: > Hello, Misc; > > I'm attempting to write an rc script to start a tmux session: What problem are you trying to solve by using an rc script? I have this in my .kshrc for automatic tmux sessions: if which tmux >/dev/null 2>&1; then # if n

Re: tmux rc script not stopping

2020-10-08 Thread ben
>So, if you have edited the script to add a pexp *after* starting >it, you'll need to remove that /var/run file otherwise it will >still use the old one or the default. I've checked the /var/run file for the script name and pexp, and everything was in place; I made sure to fi

Re: tmux rc script not stopping

2020-10-07 Thread Stuart Henderson
On 2020-10-07, ben wrote: >>I think you might need a pexp variable, process grep expression to be used b >>y pgrep to determine if the service is running. > > I've tried using pexp, the result is the same; I can start the script and > receive the 'tmux(ok)'

Re: tmux rc script not stopping

2020-10-07 Thread ben
>I think you might need a pexp variable, process grep expression to be used b >y pgrep to determine if the service is running. I've tried using pexp, the result is the same; I can start the script and receive the 'tmux(ok)' message, but upon running the '/etc/rc.d/tmux s

Re: tmux rc script not stopping

2020-10-07 Thread Brian Brombacher
> On Oct 7, 2020, at 2:35 PM, ben wrote: > > Hello, Misc; > > I'm attempting to write an rc script to start a tmux session: > >#!/bin/sh > >daemon="/usr/bin/tmux" >daemon_flags=" new -d -s MAINTMUX -n SHELL" > >

tmux rc script not stopping

2020-10-07 Thread ben
Hello, Misc; I'm attempting to write an rc script to start a tmux session: #!/bin/sh daemon="/usr/bin/tmux" daemon_flags=" new -d -s MAINTMUX -n SHELL" . /etc/rc.d/rc.subr rc_reload=NO rc_stop() { /usr

Re: ksh very slow compared to bash when running ghostscript's ./configure script

2020-07-22 Thread Julian Smith
On Wed, 22 Jul 2020 19:09:41 +0200 Theo Buehler wrote: > On Wed, Jul 22, 2020 at 07:05:31PM +0200, Theo Buehler wrote: > > This works around the bug: > > And this might even be a correct fix: > > diff --git configure.ac configure.ac > index 0d22ad59b..d27222459 100644 > --- configure.ac > +++

Re: ksh very slow compared to bash when running ghostscript's ./configure script

2020-07-22 Thread Theo Buehler
On Wed, Jul 22, 2020 at 01:10:38PM -0600, Todd C. Miller wrote: > On Wed, 22 Jul 2020 18:38:42 +0200, Theo Buehler wrote: > > > Likely glob. Many glob implementations were found to suffer from > > complexity issues: https://research.swtch.com/glob > > > > The glob(3) in libc was fixed > > https://

Re: ksh very slow compared to bash when running ghostscript's ./configure script

2020-07-22 Thread Todd C . Miller
On Wed, 22 Jul 2020 18:38:42 +0200, Theo Buehler wrote: > Likely glob. Many glob implementations were found to suffer from > complexity issues: https://research.swtch.com/glob > > The glob(3) in libc was fixed > https://github.com/openbsd/src/commit/5c36dd0c22429e7b00ed5df80ed1383807532b5 > 9 > bu

Re: ksh very slow compared to bash when running ghostscript's ./configure script

2020-07-22 Thread Theo de Raadt
Wow. We really don't live in the best of possible worlds. Theo Buehler wrote: > On Wed, Jul 22, 2020 at 07:05:31PM +0200, Theo Buehler wrote: > > This works around the bug: > > And this might even be a correct fix: > > diff --git configure.ac configure.ac > index 0d22ad59b..d27222459 100644 >

Re: ksh very slow compared to bash when running ghostscript's ./configure script

2020-07-22 Thread Theo Buehler
On Wed, Jul 22, 2020 at 07:05:31PM +0200, Theo Buehler wrote: > This works around the bug: And this might even be a correct fix: diff --git configure.ac configure.ac index 0d22ad59b..d27222459 100644 --- configure.ac +++ configure.ac @@ -483,7 +483,7 @@ AC_LINK_IFELSE( [AC_LANG_PROGRAM([#inclu

Re: ksh very slow compared to bash when running ghostscript's ./configure script

2020-07-22 Thread Theo Buehler
On Wed, Jul 22, 2020 at 06:38:42PM +0200, Theo Buehler wrote: > > I don't know what's causing this. Is there some algorithm inside ksh > > that could be running into complexity issues somehow? > > Likely glob. Many glob implementations were found to suffer from > complexity issues: https://researc

Re: ksh very slow compared to bash when running ghostscript's ./configure script

2020-07-22 Thread Theo Buehler
> I don't know what's causing this. Is there some algorithm inside ksh > that could be running into complexity issues somehow? Likely glob. Many glob implementations were found to suffer from complexity issues: https://research.swtch.com/glob The glob(3) in libc was fixed https://github.com/openb

ksh very slow compared to bash when running ghostscript's ./configure script

2020-07-21 Thread Julian Smith
It looks like ksh runs much slower than bash with current Ghostscript's ./configure script - for me it takes 20m, compared with 45s under bash. This is on OpenBSD 6.7 GENERIC.MP#1 amd64. [This kernel has visa@'s wait4() patch (see recent 'gdb in uninterruptible wait' thread),

Re: A shell script to create chroot jails

2020-04-21 Thread Zhi-Qiang Lei
nka wrote: > > On Sun, Apr 19, 2020 at 08:30:11AM BST, Zhi-Qiang Lei wrote: >> Hi, >> >> I wrote a script to create chroot jails. Please feel free to use and >> comment. Thanks. >> >> https://gist.github.com/siegfried/907904752b1b5db760782f476f44fca4 >>

A shell script to create chroot jails

2020-04-19 Thread Zhi-Qiang Lei
Hi, I wrote a script to create chroot jails. Please feel free to use and comment. Thanks. https://gist.github.com/siegfried/907904752b1b5db760782f476f44fca4 Sincerely yours, Siegfried zhiqiang@gmail.com

simple script to merge faq files in a single html (was Re: Web documentation available offline by default?)

2020-03-02 Thread Vincenzo Nicosia
Please find attached a preliminary rough shell script that does the job for the faq[0-9]+.html files, keeping track of anchors appropriately. It is missing pf, ports, and other files, but it's a starting point. Disclaimer: this is unofficial stuff and I am not asking for this script

Re: rspamd stop rc script doesn't work in OpenBSD 6.6

2020-02-10 Thread Diana Eichert
SIGKILL seems pretty harsh, have you tried SIGTERM instead? On Sun, Feb 9, 2020 at 12:48 PM aisha wrote: > > You need to use pkill -9 to kill rspamd, which i think should be added > to the stop part of the rspamd daemon. > > At least this is what I have been using, any other methods would be nice

Re: rspamd stop rc script doesn't work in OpenBSD 6.6

2020-02-09 Thread Stuart Henderson
On 2020-02-09, aisha wrote: > You need to use pkill -9 to kill rspamd, which i think should be added > to the stop part of the rspamd daemon. > > At least this is what I have been using, any other methods would be nice > to know. Something wedges in rspamd in the version in 6.6 when you signal

Re: rspamd stop rc script doesn't work in OpenBSD 6.6

2020-02-09 Thread Jordan Geoghegan
On 2020-02-09 11:46, aisha wrote: You need to use pkill -9 to kill rspamd, which i think should be added to the stop part of the rspamd daemon. At least this is what I have been using, any other methods would be nice to know. You dont need to restart rspamd if you're just modifying a co

Re: rspamd stop rc script doesn't work in OpenBSD 6.6

2020-02-09 Thread aisha
You need to use pkill -9 to kill rspamd, which i think should be added to the stop part of the rspamd daemon. At least this is what I have been using, any other methods would be nice to know. --- Aisha blog.aisha.cc On 2020-02-09 14:38, Özgür Kazancci wrote: Hi Stephan, I got the same trou

Re: rspamd stop rc script doesn't work in OpenBSD 6.6

2020-02-09 Thread Özgür Kazancci
Hi Stephan, I got the same trouble. Fresh installation of OpenBSD 6.6 and redis+rspamd. Was google-ing regarding that issue and got your workaround. What you mean by "if you enable rspamd etc on boot by rcctl.."? Mine, is already enabled (I issued rcctl enable rspamd after the installation)

Re: Modifying installXX.iso via script

2019-11-17 Thread chohag
hear more about what your working on but > > Nothing special. Only private stuff. I want to move from to-do lists to > scripts. I believe the buzzword is "infrastructure as code" :-) That is indeed one of the many. Personally I call it "my job" and am doing my level best to replace myself with a very small shell script. Currently down to ~3000 lines. Matthew

Re: Modifying installXX.iso via script

2019-11-17 Thread Thomas Bohl
Thanks. For completeness what I did for now: # vnconfig vnd0 install66.iso # mount -t cd9660 /dev/vnd0c cd/ # cp -r cd cd2 # cp bsd-mod.rd cd2/6.6/amd64/bsd.rd # cp site66.tgz cd2/6.6/amd64/ # mkhybrid -a -R -T -L -l -d -D -N -o install66a.iso -vv -A "Unofficial OpenBSD 6.6 amd64 autoinstall CD"

Re: Modifying installXX.iso via script

2019-11-17 Thread Thomas Bohl
Am 17.11.2019 um 19:51 schrieb cho...@jtan.com: Thomas Bohl writes: Now I want to go the extra step and automate the modification of the installXX.iso. I have put an insane amount of work into exactly this, also with an eye to portably directing the process to other operating systems and host

Re: Modifying installXX.iso via script

2019-11-17 Thread chohag
Thomas Bohl writes: > > Now I want to go the extra step and automate the modification of the > installXX.iso. I have put an insane amount of work into exactly this, also with an eye to portably directing the process to other operating systems and hosting environments. I'd be very interested to h

Modifying installXX.iso via script

2019-11-17 Thread Thomas Bohl
Hello list, I created an autoinstall bsd.rd (containing auto_install.conf and disklabel.conf) and a siteXX.tgz. For example with the tool isomaster I can manually edit the install66.iso and add bsd.rd and site66.tgz to the directory 6.6/amd64. This modified ISO can be booted from real and vi

Re: rspamd stop rc script doesn't work in OpenBSD 6.6

2019-11-02 Thread Stuart Henderson
On 2019-10-29, List wrote: > I think what causes the problem is rspamd which uses JITs. These JITS > break W^X. If you enable rspamd etc on boot by (rcctl enable ...). And > reboot.. This is incorrect. rspamd uses luajit (on arches where it's available), but it is not a requirement that every JIT

Re: rspamd stop rc script doesn't work in OpenBSD 6.6

2019-10-30 Thread prx
* List le [29-10-2019 21:44:43 +0100]: > On Sun, 27 Oct 2019 21:29:41 -0700 > Jordan Geoghegan wrote: > > > On 2019-10-27 17:29, Chris Narkiewicz wrote: > > > Rspamd stop rc script doesn't work in OpenBSD 6.6. > > > > > > 1. Fresh OpenBSD 6.6 inst

Re: rspamd stop rc script doesn't work in OpenBSD 6.6

2019-10-29 Thread List
On Sun, 27 Oct 2019 21:29:41 -0700 Jordan Geoghegan wrote: > On 2019-10-27 17:29, Chris Narkiewicz wrote: > > Rspamd stop rc script doesn't work in OpenBSD 6.6. > > > > 1. Fresh OpenBSD 6.6 installation > > 2. pkg_add rspamd > > 3. rcctl start rspamd >

Re: rspamd stop rc script doesn't work in OpenBSD 6.6

2019-10-27 Thread Jordan Geoghegan
On 2019-10-27 17:29, Chris Narkiewicz wrote: Rspamd stop rc script doesn't work in OpenBSD 6.6. 1. Fresh OpenBSD 6.6 installation 2. pkg_add rspamd 3. rcctl start rspamd Works. 4. rcctl stop rspamd timeouts Looking at rspamd logs, it looks like it doesn not work well with SIGTERM. It

sysupgrade script diff for people with small /home

2019-08-12 Thread Jiri B
Hi, see $subj, some people have so small /home and currently sysupgrade doesn't like symlink to bigger partition. (I know that bad symlink can make it explode.) --- /usr/sbin/sysupgrade.orig Mon Aug 12 19:07:11 2019 +++ /usr/sbin/sysupgradeMon Aug 12 18:51:28 2019 @@ -119,6 +119,7 @@ el

  1   2   3   4   5   6   7   8   >