4 # homepage: https://git.rootprojects.org/root/serviceman
5 # tagline: cross-platform service management for Linux, Mac, and Windows
7 # A system laucher that wraps `launchctl` (macOS), `systemctl` (Linux),
8 # and the Windows Registry to work cross-platform.
11 # Works with anything, including
16 # serviceman add --name my-service node ./serve.js --port 3000
22 # go build -mod vendor cmd/my-service
23 # serviceman add ./my-service --port 3000
29 # serviceman add --name backuper bash ./backup.sh /mnt/data
37 my_serviceman=$(command -v serviceman)
39 if [ -n "$my_serviceman" ]; then
40 if [ "$my_serviceman" != "$HOME/.local/bin/serviceman" ]; then
41 echo "a serviceman installation (which make take precedence) exists at:"
42 echo " $my_serviceman"
48 webi_download "https://rootprojects.org/serviceman/dist/$(uname -s)/$(uname -m)/serviceman" "$HOME/Downloads/serviceman"
49 chmod +x "$HOME/Downloads/serviceman"
50 mv "$HOME/Downloads/serviceman" "$HOME/.local/bin/"
52 # add to ~/.local/bin to PATH, just in case
53 webi_path_add $HOME/.local/bin # > /dev/null 2> /dev/null
54 # TODO inform user to add to path, apart from pathman?