Skip to content

Instantly share code, notes, and snippets.

@doudou
Created December 14, 2020 20:38
Show Gist options
  • Save doudou/6bcae0c413d7524dac3f962230c1a666 to your computer and use it in GitHub Desktop.
Save doudou/6bcae0c413d7524dac3f962230c1a666 to your computer and use it in GitHub Desktop.
Auto-clean the omniNames log before it starts
# Install this content in /lib/systemd/system/omniorb4-clean-log.service
# (Make sure it is owned and writable only by root !)
#
# Then run
# systemctl daemon-reload
# systemctl restart omniorb4-nameserver
[Unit]
Description=Cleanup omniorb log before starting it
Before=omniorb4-nameserver.service
[Service]
ExecStart=/bin/sh -c "rm -f /var/lib/omniorb/*"
Type=oneshot
[Install]
WantedBy=omniorb4-nameserver.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment