-
Notifications
You must be signed in to change notification settings - Fork 74
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
Config woes #152
Comments
Hmm… this does sound a bit odd. Can you show me your fpm command-line? I’ll see if I can reproduce this behavior with it.
…On Fri, Jun 24, 2022, at 1:02 AM, marcbrevoort-cyberhive wrote:
There appears to be something fundamental I'm missing on how the combi of fpm and pleaserun deals with configurations.
I have a sample config file in my `.deb` package which unpacks to `/etc/default/myconfig.example`.
For this application, this can/should be manually edited and saved to `/etc/default/myconfig` after which the service can be started and the config file is picked up.
However, when I (re)install the `.deb` package, `/etc/default/myconfig` gets truncated to 0 bytes and the configuration is lost.
Moreover, this truncating appears to happen BEFORE the `--before-install` script is run, thwarting my cunning plan to back it up before install and writing it back afterwards.
So I tried storing the confiuration in `/etc/init.d/` instead, which doesn't get overwritten, but it also doesn't get picked up.
What's the magic incantation that makes configurations be used and not overwritten each (re)install?
—
Reply to this email directly, view it on GitHub <#152>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AABAF2SESYAXYDNKHFW5HA3VQVTQPANCNFSM5ZW4ZG7Q>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
the fpm command line creating these empty package files is
and the above creates blank The workaround I've had in place for some time is
As the |
There appears to be something fundamental I'm missing on how the combi of fpm and pleaserun deals with (environment) configurations.
I have a sample config file in my
.deb
package which unpacks to/etc/default/packagename.example
.For this application, this can/should be manually edited and saved to
/etc/default/packagename
after which the service can be started and the config file is picked up.However, when I (re)install the
.deb
package,/etc/default/packagename
gets truncated to 0 bytes and the configuration is lost.Moreover, this truncating appears to happen BEFORE the
--before-install
script is run, thwarting my cunning plan to back it up before install and writing it back afterwards.So I tried storing the confiuration in
/etc/init.d/
instead, which doesn't get overwritten, but it also doesn't get picked up.What's the magic incantation that makes configurations be used and not overwritten each (re)install?
I have tried
--config-files
--deb-no-default-config-files
flag/etc
as config files (which would recursively set all files in there configuration)--before-remove
cleanup scriptBut the
/etc/default/packagename
file keeps getting overwritten. What else could be causing this behaviour?Update: The "pleaserun" dir contains various 0-length files called
/etc/default/packagename
Which turned out to be the culprit.
Ideally these would not be generated at all, but for now I'm removing any files ending in
/etc/default/packagename
from the pleaserun directory and that stops pleaserun from killing my configurations.The text was updated successfully, but these errors were encountered: