Skip to content

Commit

Permalink
couchpotatoserver: remove bottle :unneeded and use service
Browse files Browse the repository at this point in the history
Closes #80078.

Signed-off-by: Carlo Cabrera <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
  • Loading branch information
cho-m authored and BrewTestBot committed Jun 27, 2021
1 parent 67d7349 commit 5f6f9e8
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions Formula/couchpotatoserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,14 @@ class Couchpotatoserver < Formula
license "GPL-3.0"
head "https://github.com/CouchPotato/CouchPotatoServer.git"

bottle :unneeded

def install
prefix.install_metafiles
libexec.install Dir["*"]
(bin+"couchpotatoserver").write(startup_script)
end

def caveats
"CouchPotatoServer defaults to port 5050."
end

plist_options manual: "couchpotatoserver"

def plist
<<~EOS
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/couchpotatoserver</string>
<key>ProgramArguments</key>
<array>
<string>--quiet</string>
<string>--daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>#{`whoami`.chomp}</string>
</dict>
</plist>
EOS
service do
run [opt_bin/"couchpotatoserver", "--quiet"]
end

def startup_script
Expand Down

0 comments on commit 5f6f9e8

Please sign in to comment.