RC-SERVICE(8)

πŸ’– NAME πŸ’–

rc-service β€” find that OpenRC service, then run it with whatever args you handed over 🫢

okay so real talk, the manual page name is rc-service(8) and it lives in the System Manager's Manual section (that's section 8, for the sysadmin girlies). she's a baddie, she's a workhorse, let's get into it πŸ’…


✨ SYNOPSIS ✨

rc-service [-c, --ifcrashed] service cmd [...]
rc-service -d, --debug service cmd [...]
rc-service -D, --nodeps service cmd [...]
rc-service [-i, --ifexists] service cmd [...]
rc-service [-I, --ifinactive] service cmd [...]
rc-service [-N, --ifnotstarted] service cmd [...]
rc-service [-s, --ifstarted] service cmd [...]
rc-service [-S, --ifstopped] service cmd [...]
rc-service -e, --exists service
rc-service -Z, --dry-run service cmd [...]
rc-service -l, --list
rc-service -r, --resolve service

like. look at her go. so many moods, all iconic 🌈


🌸 DESCRIPTION 🌸

bestie, here's the whole vibe: service scripts could be in different places on different systems. rude, right? so rc-service locates the specified service and runs it with the given arguments. that's the whole job. she finds it, she runs it, she doesn't make it weird πŸ’–

now for the conditional girlies, because sometimes you want a 0 and not a whole meltdown:

  • if you pass -i, --ifexists, then rc-service returns 0 even if the service does not exist. no service? no problem, still slay πŸŽ€
  • if you pass -I, --ifinactive or -N, --ifnotstarted, then rc-service returns 0 if the service exists but is in the wrong state. she's there, she's just not doing the thing, and we're being chill about it 😌

and if you hit her with the -l, --list argument? then rc-service will list all available services. window shopping, but for daemons ✨

okay now the little lookup ones:

  • -e, --exists β€” return 0 if it can find service, otherwise -1. literally just a yes/no vibe check πŸ”
  • -r, --resolve β€” does the same and also prints the full path of the service to stdout. same energy but she tells you where the service is living. giving tour guide πŸ¦‹

and the behaviour-tweaking ones:

  • -d, --debug β€” sets -x when running the service script(s). all the tea gets spilled to your terminal πŸ“
  • -D, --nodeps β€” ignores dependencies when running the service. she's going in solo, no entourage, main character energy πŸ‘‘
  • -Z, --dry-run β€” displays commands rather than executing them. dress rehearsal only, nothing actually happens, no cap πŸ™ˆ
heads up bestie: -c, --ifcrashed, -s, --ifstarted and -S, --ifstopped show up in the synopsis, but this page doesn't give them their own description line. so I'm not gonna invent lore for them. what's written is what's written, fr fr πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

go read those next, iykyk πŸ“šβœ¨


πŸ’œ AUTHORS πŸ’œ

Roy Marples <roy@marples.name> β€” the legend, the blueprint, the moment 🌟


and that's the whole page, periodt πŸŽ€

this was rc-service from OpenRC, dated May 1, 2009 πŸ’– go forth and manage your services, bestie, you're gonna eat πŸ’…πŸ«Ά

πŸ“¦ where this page comes from