1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2025-01-03 05:35:29 +00:00

built the service file with tee directly in the correct directory vs using a mv

ixipaulixi 2017-01-17 11:35:35 -05:00
parent 41d0815df3
commit db67e2c987

@ -31,31 +31,23 @@ yum -y install wget git par2cmdline p7zip unrar unzip tar gcc python-yenc python
*Create your systemd unit file *Create your systemd unit file
cat > sonarr.service << EOF tee /usr/lib/systemd/system/sonarr.service << EOF
[Unit] [Unit]
Description=Sonarr Daemon Description=Sonarr Daemon
After=syslog.target network.target After=syslog.target network.target
[Service] [Service]
User=sonarr User=sonarr
Group=sonarr Group=sonarr
Type=simple Type=simple
ExecStart=/usr/bin/mono /opt/sonarr/NzbDrone.exe -nobrowser -data /opt/sonarr ExecStart=/usr/bin/mono /opt/sonarr/NzbDrone.exe -nobrowser -data /opt/sonarr
TimeoutStopSec=20 TimeoutStopSec=20
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF 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 *Add firewall exceptions if the firewall is enabled
tee /etc/firewalld/services/sonarr.xml << EOF tee /etc/firewalld/services/sonarr.xml << EOF
<service> <service>
<short>sonarr</short> <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"/> <port protocol="tcp" port="8989"/>
</service> </service>
EOF EOF
firewall-cmd --reload firewall-cmd --reload
firewall-cmd --permanent --add-service sonarr firewall-cmd --permanent --add-service sonarr
firewall-cmd --reload firewall-cmd --reload