mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-22 07:43:01 +00:00
built the service file with tee directly in the correct directory vs using a mv
parent
41d0815df3
commit
db67e2c987
1 changed files with 3 additions and 10 deletions
|
@ -31,31 +31,23 @@ yum -y install wget git par2cmdline p7zip unrar unzip tar gcc python-yenc python
|
|||
|
||||
*Create your systemd unit file
|
||||
|
||||
cat > sonarr.service << EOF
|
||||
|
||||
tee /usr/lib/systemd/system/sonarr.service << EOF
|
||||
[Unit]
|
||||
Description=Sonarr Daemon
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
User=sonarr
|
||||
Group=sonarr
|
||||
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/mono /opt/sonarr/NzbDrone.exe -nobrowser -data /opt/sonarr
|
||||
TimeoutStopSec=20
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
*Now move the unit file to the proper location
|
||||
|
||||
mv sonarr.service /usr/lib/systemd/system/
|
||||
|
||||
*Add firewall exceptions if the firewall is enabled
|
||||
|
||||
tee /etc/firewalld/services/sonarr.xml << EOF
|
||||
<service>
|
||||
<short>sonarr</short>
|
||||
|
@ -63,6 +55,7 @@ yum -y install wget git par2cmdline p7zip unrar unzip tar gcc python-yenc python
|
|||
<port protocol="tcp" port="8989"/>
|
||||
</service>
|
||||
EOF
|
||||
|
||||
firewall-cmd --reload
|
||||
firewall-cmd --permanent --add-service sonarr
|
||||
firewall-cmd --reload
|
||||
|
|
Loading…
Reference in a new issue