If my ZNC config file in ~/.znc/configs/znc.conf is a symlink to ~/dotfiles/znc/.znc/configs/znc.conf -- which it is, if I use stow to manage the file -- then ZNC should respect the symlink I have, and write its configuration to the underlying real file, not to the symlink.
As it is, I have to copy and update the symlink each time I want to start ZNC, and as soon as I do that, it overwrites the symlink with a file.
If my ZNC config file in `~/.znc/configs/znc.conf` is a symlink to `~/dotfiles/znc/.znc/configs/znc.conf` -- which it is, if I use stow to manage the file -- then ZNC should respect the symlink I have, and write its configuration to the underlying real file, not to the symlink.
As it is, I have to copy and update the symlink each time I want to start ZNC, and as soon as I do that, it overwrites the symlink with a file.
<!-- github-sync-id:20849874 -->
ZNC doesn't write directly to the file, but to the other file first, and then moves it over the old config.
You don't want to lose the config in case of some ZNC crash, or electricity failure during the process of writing config, do you?
ZNC doesn't write directly to the file, but to the other file first, and then moves it over the old config.
You don't want to lose the config in case of some ZNC crash, or electricity failure during the process of writing config, do you?
<!-- github-comment-id:26114048 -->
No, but it should be possible to effect the same change using the real path of the config file, as opposed to the symlinked path.
No, but it should be possible to effect the same change using the real path of the config file, as opposed to the symlinked path.
<!-- github-comment-id:26114082 -->
The suggestion to use -d only works if my .znc configuration is in a single stow. The setup of my stow configuration means that different hosts contribute different parts of the config, and that results in the ~/.znc directory being made up of many other parts.
It seems logical that the fix would be to update the file write method to:
while target_file is a symlink:
target_file = target_file.linked_target
swap_content_safely(target_file)
That doesn't seem unreasonable, although that might be a bitch in the code as it is.
I don't seem to be able to reopen this, btw.
The suggestion to use -d only works if my .znc configuration is in a single stow. The setup of my stow configuration means that different hosts contribute different parts of the config, and that results in the ~/.znc directory being made up of many other parts.
It seems logical that the fix would be to update the file write method to:
```
while target_file is a symlink:
target_file = target_file.linked_target
swap_content_safely(target_file)
```
That doesn't seem unreasonable, although that might be a bitch in the code as it is.
I don't seem to be able to reopen this, btw.
<!-- github-comment-id:26114448 -->
It's not because I'm lazy, but because parts of config are elsewhere, so storing only znc.conf is not enough, while -d (or just symlinking .znc to whatever directory) causes ZNC to store everything at the specified dir.
So, what are other parts which you put to that stow except znc.conf?
It's not because I'm lazy, but because parts of config are elsewhere, so storing only znc.conf is not enough, while -d (or just symlinking .znc to whatever directory) causes ZNC to store everything at the specified dir.
So, what are other parts which you put to that stow except znc.conf?
<!-- github-comment-id:26114587 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
If my ZNC config file in
~/.znc/configs/znc.confis a symlink to~/dotfiles/znc/.znc/configs/znc.conf-- which it is, if I use stow to manage the file -- then ZNC should respect the symlink I have, and write its configuration to the underlying real file, not to the symlink.As it is, I have to copy and update the symlink each time I want to start ZNC, and as soon as I do that, it overwrites the symlink with a file.
ZNC doesn't write directly to the file, but to the other file first, and then moves it over the old config.
You don't want to lose the config in case of some ZNC crash, or electricity failure during the process of writing config, do you?
Start
znc -d ~/dotfiles/znc/.zncinstead, and it'll use that dir to store all configsNo, but it should be possible to effect the same change using the real path of the config file, as opposed to the symlinked path.
Hey, we love our dotfiles! Don't be like every miserable projects. I hope it's not because you are lazy.
The suggestion to use -d only works if my .znc configuration is in a single stow. The setup of my stow configuration means that different hosts contribute different parts of the config, and that results in the ~/.znc directory being made up of many other parts.
It seems logical that the fix would be to update the file write method to:
That doesn't seem unreasonable, although that might be a bitch in the code as it is.
I don't seem to be able to reopen this, btw.
It's not because I'm lazy, but because parts of config are elsewhere, so storing only znc.conf is not enough, while -d (or just symlinking .znc to whatever directory) causes ZNC to store everything at the specified dir.
So, what are other parts which you put to that stow except znc.conf?
Silence...