Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rc.d startup script for [Free]BSD #256

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

n-connect
Copy link
Contributor

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

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.

Signed-off-by: n-connect <[email protected]>
@GuillaumedeVolpiano
Copy link
Contributor

May I suggest changing line 32 to

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

@n-connect
Copy link
Contributor Author

n-connect commented Jun 6, 2023

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

Typo: leading slash removed for binary

Signed-off-by: n-connect <[email protected]>
@icewind1991
Copy link
Member

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

@n-connect
Copy link
Contributor Author

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.

@thstyl2000
Copy link

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

@n-connect
Copy link
Contributor Author

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
Copy link
Contributor Author

@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...

@thstyl2000
Copy link

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?

@n-connect
Copy link
Contributor Author

n-connect commented May 22, 2024

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)

@thstyl2000
Copy link

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants