notify_push icon indicating copy to clipboard operation
notify_push copied to clipboard

rc.d startup script for [Free]BSD

Open n-connect opened this issue 2 years ago • 10 comments

As a separate file, it can be included in a tar.gz/zip etc. release package during CI/CD process/jobs with the other files.

Variable based Nextcloud web root nextcloud_notify_push_droot let it set in /etc/rc.conf -> no need to edit the rc.d script itself

n-connect avatar Apr 03 '23 12:04 n-connect

May I suggest changing line 32 to

binary="/${nextcloud_notify_push_droot}/apps/notify_push/bin/fbsd_amd64/notify_push"

GuillaumedeVolpiano avatar Jun 06 '23 13:06 GuillaumedeVolpiano

Thanks! Done. Edit: the leading slash is in the variable already

n-connect avatar Jun 06 '23 13:06 n-connect

Could you expand the setup wizard to reference this startup script when freebsd is detected?

icewind1991 avatar Jun 08 '23 16:06 icewind1991

That't the idea, I'll check out. Also noted in parallel at #153 the binary include size problem, yeah its already 3 times ~22Mbytes included in the app release package. Originally it was about the have FreeBSD rust binary compiled, which done in #254 . This PR born right after with the idea having a similar easy setup from zero.

n-connect avatar Jun 08 '23 16:06 n-connect

Hello there! Wanted to ask about the status and if there is anything we can do to help with this. Thank you!

thstyl2000 avatar May 22 '24 08:05 thstyl2000

Sorry, I've completely forgot that this original PR not closed with original content/changes I've given Ive raised it. I'm using the rc.d script before the PR raised, and just replacing the binaries with new releases.

I have to check the whole scripting, I don't know what it is doing. In case anyone has the prior knowledge about this setup wizard script, please jump in. I wanted to do the things separately one by one - it seems that was the good idea :)

n-connect avatar May 22 '24 14:05 n-connect

@icewind1991 , @thstyl2000

Please fix me: Am I in the right direction with the below idea?

Read again #273, where @GuillaumedeVolpiano was great and extended the below already:

  • Binaryfinder.php
  • Setup.php
  • SetupWizard.php It can run & see its FB and it can result good for recognising the prebuilt binaries for FB.

So, hasSystemd() L87 needs extensions:

  • check if system is FB -> if yes, check for rc.d directory & the rc.d file (?confirm overwrite here?) -> set return to 0 and exit -> plus make sure the normal bundled binary steps has added the FB rc.d script copy
  • otherwise run the normal/previous code for hasSystemd()

OR, can be done one level upper, have another function hasRcd, and handle from there.

I need to see the "normal" bundled file operations yet...

n-connect avatar May 22 '24 16:05 n-connect

Maybe it is a stupid question, but why is it needed to check for rc.d, if the system is already detected as freebsd? As far as I know, there is practically no other init system used together with freebsd. So when the setup wizard detects freebsd, it could directly write the rc script in /usr/local/etc/rc.d/ (could add a check for an already existing script, and prompting for overwrite/keep old/view diff....).

What do you think?

thstyl2000 avatar May 22 '24 18:05 thstyl2000

Not at all, I didn't know, how sure you wanna go, with how many crosschecks. Hence my beginning/closing question-marks in the brackets after the rc.d check part.

I'm in the same page: confirming FreeBSD as platform should be enough, up until there will be FreeBSD ARM releases (maybe its already there).

Edit: nor FreeBSD Arm release yet for notify_push - but two for Linux: armv7 and aarch64 -> FB has also armv7 and arm64 from 13.0 (14.0 available from Q4 last year)

n-connect avatar May 22 '24 19:05 n-connect

Oh alright, didn't know that, thanks! I suppose then going with a hasRcd function (to keep the structure logic clear) would be better if you ask me...

thstyl2000 avatar May 23 '24 05:05 thstyl2000