{"id":16824886,"url":"https://github.com/tomnomnom/symwatch","last_synced_at":"2025-09-07T06:36:23.024Z","repository":{"id":57574930,"uuid":"57221838","full_name":"tomnomnom/symwatch","owner":"tomnomnom","description":"A tool to run a command when the target of a symlink changes","archived":false,"fork":false,"pushed_at":"2016-04-28T23:46:58.000Z","size":10,"stargazers_count":16,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-07T06:36:02.715Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomnomnom.png","metadata":{"files":{"readme":"README.mkd","changelog":"CHANGELOG.mkd","contributing":"CONTRIBUTING.mkd","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-27T14:53:18.000Z","updated_at":"2025-02-18T19:39:24.000Z","dependencies_parsed_at":"2022-09-18T06:06:00.928Z","dependency_job_id":null,"html_url":"https://github.com/tomnomnom/symwatch","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tomnomnom/symwatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fsymwatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fsymwatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fsymwatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fsymwatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomnomnom","download_url":"https://codeload.github.com/tomnomnom/symwatch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fsymwatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274005334,"owners_count":25205934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T11:12:19.243Z","updated_at":"2025-09-07T06:36:22.998Z","avatar_url":"https://github.com/tomnomnom.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# symwatch\n\nWatches a symlink and runs a command when the target of the symlink changes.\n\n[![Build Status](https://travis-ci.org/tomnomnom/symwatch.svg?branch=master)](https://travis-ci.org/tomnomnom/symwatch)\n\n## Installation\n```\ngo get github.com/tomnomnom/symwatch\n```\n\n## Usage\n\n```\nUsage:\n  symwatch \u003csymlink\u003e \u003ccommand\u003e [\u003cpollInterval\u003e]\n\nOptions:\n  symlink\tAn absolute or relative path to a symlink\n  command\tThe command to run when the symlink target changes\n  pollInterval\tThe number of milliseconds to wait between polling the symlink (default 500)\n\nNotes:\n  * If the symlink is unreadable for more than 5 attempts the process will exit\n  * Commands are passed to `sh -c`\n\nExit Codes:\n  0\tOK\n  1\tInvalid Arguments\n  2\tInvalid Symlink\n  3\tSymlink Went Away\n\nExample:\n  symwatch /var/www/current 'service apache2 graceful' 500\n```\n\n## Motivation\n\nIt's a fairly common pattern to use a symlink to point to the current version of\na codebase. Sometimes it's neccesary to restart processes or clear caches when the version\nof a codebase changes.\n\n## Why not use inotify?\n\nIt's not portable. In particular it does not work if the symlink being polled is on an NFS share.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomnomnom%2Fsymwatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomnomnom%2Fsymwatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomnomnom%2Fsymwatch/lists"}