Automate /opt↔repo sync, protect installers from overwrites, and add systemd unit #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
/opt/azazel/configsynchronized with the repository, prevent installers from clobbering repository-managed files, and add a systemd unit to run the linking on boot.version:fromdeploy/docker-compose.ymland include several workspace fixes (menus, docs, systemd units, scripts).What I changed
scripts/link_opt_to_repo.sh— backs up existing files and creates symlinks from/opt/azazel/config/*to the repositorydeploy/files (auto-includes files underdeploy/).scripts/prevent_installer_overwrite.sh— helper to detect repo-managed symlinked config files.systemd/link-opt.service— oneshot systemd unit to run the linking script at boot (enabled).scripts/install_azazel_complete.sh— integrated overwrite guard for/etc/docker/daemon.json.scripts/install_suricata_env.sh.deprecated— same guard integrated.deploy/docker-compose.yml— removed obsolete top-levelversion:key.Why
runcentry that previously caused dockerd to fail).Testing performed
/etc/docker/daemon.json(backup created).scripts/link_opt_to_repo.shand confirmed symlinks created in/opt/azazel/configwith backups in/opt/azazel/config/*.bak.*.link-opt.serviceand confirmed it exits successfully.docker-compose up -dfrom repositorydeploy/(resolved name conflicts by removing existing containers) and verified containers started.Migration / rollback notes
/opt/azazel/config/<name>.bak.<timestamp>. Restore by moving the backup back into place and disablinglink-opt.serviceif needed./opt, do not enablelink-opt.serviceand restore backups.daemon.jsonif it is symlinked to the repo; if you want the installer to override, remove the symlink before running.Files changed (high level)
scripts/link_opt_to_repo.sh,scripts/prevent_installer_overwrite.sh,systemd/link-opt.servicescripts/install_azazel_complete.sh,scripts/install_suricata_env.sh.deprecated,deploy/docker-compose.ymlNotes / follow-ups
link_opt_to_repo.shto support more directories or to perform safe rsync-style updates for larger config sets.