{"id":30211279,"url":"https://github.com/mons/daemond-lite","last_synced_at":"2025-08-13T20:35:40.279Z","repository":{"id":5789812,"uuid":"7004018","full_name":"Mons/Daemond-Lite","owner":"Mons","description":"Lightweight version of daemonization toolkit","archived":false,"fork":false,"pushed_at":"2022-02-08T10:47:41.000Z","size":127,"stargazers_count":5,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-05-02T00:20:23.554Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mons.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-04T17:33:46.000Z","updated_at":"2020-12-02T09:44:45.000Z","dependencies_parsed_at":"2022-09-23T23:41:18.764Z","dependency_job_id":null,"html_url":"https://github.com/Mons/Daemond-Lite","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/Mons/Daemond-Lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FDaemond-Lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FDaemond-Lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FDaemond-Lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FDaemond-Lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mons","download_url":"https://codeload.github.com/Mons/Daemond-Lite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FDaemond-Lite/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270305853,"owners_count":24562110,"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-08-13T02:00:09.904Z","response_time":66,"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":"2025-08-13T20:34:25.977Z","updated_at":"2025-08-13T20:35:40.257Z","avatar_url":"https://github.com/Mons.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    Daemond::Lite - Lightweight version of daemonization toolkit\n\nSYNOPSIS\n        package main;\n        use Daemond::Lite;\n\n        name 'sample';\n        config 'daemon.conf';\n        children 1;\n        pid '/tmp/%n.%u.pid';\n\n        nocli; # start without commands (start/stop)\n\n        getopt {\n        {\n            desc   =\u003e \"My custom option\",\n            eqdesc =\u003e \"=myvalue\",\n            getopt =\u003e \"option|o=s\",\n            setto  =\u003e sub { $_[0]{myopt1} = 1 }, # will be accessible via $self-\u003e{opt}{myopt1}\n        },\n        {\n            desc   =\u003e \"My custom option 2\",\n            eqdesc =\u003e \"=mynumber\",\n            getopt =\u003e \"option|o=i\",\n            setto  =\u003e sub { $_[0]{myopt2} = 1 }, # will be accessible via $self-\u003e{opt}{myopt2}\n        },\n        };\n\n        logging { # optional\n        my ($self,$detach) = @_;\n        Log::Any::Adapter-\u003eset('Easy',\n            $detach ? (\n            syslog =\u003e { ident =\u003e $self-\u003ename, facility =\u003e 'daemon' },\n            ):(\n            syslog =\u003e { ident =\u003e $self-\u003ename, facility =\u003e 'daemon' },\n            screen =\u003e 1\n            )\n        );\n        my $newlog = Log::Any-\u003eget_logger();\n        warn \"setup logging $newlog\";\n        $newlog;\n        };\n\n        sub check { # before detach, but after all configuration\n        warn \"$$ checking\";\n        }\n\n        sub start { # before fork\n        warn \"$$ starting\";\n        }\n\n        sub run { # inside forked child\n        warn \"$$ run\";\n        my $self = shift;\n        $self-\u003e{run} = 1;\n        while($self-\u003e{run}) {\n            sleep 1;\n        }\n        }\n\n        sub stop {\n        warn \"$$ stop\";\n        my $self = shift;\n        $self-\u003e{run} = 0;\n        }\n\n        runit();\n\nDESCRIPTION\n        Easy tool for creating daemons\n\n    source: name, pid, conffile, ... config: name, pid, ... getopt:\n    conffile, pid, ...\n\nAUTHOR\n    Mons Anderson, \"\u003cmons@cpan.org\u003e\"\n\nCOPYRIGHT \u0026 LICENSE\n    Copyright 2012 Mons Anderson, all rights reserved.\n\n    This program is free software; you can redistribute it and/or modify it\n    under the terms of either: the GNU General Public License as published\n    by the Free Software Foundation; or the Artistic License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmons%2Fdaemond-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmons%2Fdaemond-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmons%2Fdaemond-lite/lists"}