I have read the sibling comment thread. Using perlbrew/cpanm on the production system is not a good idea, IMO.
- They are tools geared toward development; they are easy to use for you, the developer, but annoying for the end user.
- perlbrew/cpanm take a huge amount of time to install, compared to just a few seconds with a binary package.
- If something goes wrong with perlbrew/cpanm, the client has no idea how to fix it.
- Offline installation is straight-forward with a binary package, but complicated with perlbrew/cpanm, you'd need to ship some sort of minicpan.
I don't have experience with FreeBSD. Found instructions: http://lastsummer.de/creating-custom-packages-on-freebsd/
I need to know the Linux distro so I can also link you to the appropriate Web site. Meanwhile I'm going to assume you're targetting deb/rpm and systemd, that already covers a lot of what's running out there in the wild.
Create new user for executing the application
What purpose does it serve? Can't the software run just under a normal user account, like 97% of the other packages on any ordinary system?
It can be run both via cron and as service.
You achieve this simply by shipping a
.timer file and corresponding
.service file as part of the package.
There are many tutorials, I like
https://wiki.archlinux.org/index.php/Systemd/Timers. Also see
/usr/lib/systemd/system/* for local examples.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.