diff --git a/05a - Post YML Docker Fix b/05a - Post YML Docker Fix index dbd22651b3..e32bc82f3f 100644 --- a/05a - Post YML Docker Fix +++ b/05a - Post YML Docker Fix @@ -35,39 +35,31 @@ docker restart plex exit 0; ##### Copy #### END -# Press CTRL+X; then Enter. Editing rc.local to add postyml fix -sudo nano /etc/rc.local +# Press CTRL+X; then Enter. -# Place the line below above "exit 0" | If your missing the rc.local script and it shows new; then goto the very bottom -sh /opt/postyml.sh & -# Press CTRL+X and then ENTER to save - -# Assign permissions so your script can execute -sudo chown root /etc/rc.local -sudo chmod 755 /etc/rc.local +sudo chown root:root /opt/postyml.sh sudo chmod 755 /opt/postyml.sh -sudo chown root /opt/postyml.sh -sudo /etc/init.d/rc.local start -################# Post YML FIX ################# END -################# Only for Missing rc.local ###################### START -########################### Make the script look like this, then resume above at # Assign permissions so ... +sudo nano /etc/systemd/system/postyml.service + +##### START COPY ##### +[Unit] +Description=rclonemount +After=multi-user.target + +[Service] +ExecStart=/bin/bash /opt/postyml.sh +ExecStop=/bin/bash /opt/postyml.sh +Restart=on-abort +[Install] +WantedBy=multi-user.target -#!/bin/sh -e -# -# rc.local -# -# This script is executed at the end of each multiuser runlevel. -# Make sure that the script will "exit 0" on success or any other -# value on error. -# -# In order to enable or disable this script just change the execution -# bits. -# -# By default this script does nothing. +##### END COPY ##### -sh /opt/postyml.sh & +sudo systemctl daemon-reload +sudo systemctl enable postyml.service +sudo systemctl start postyml.service +sudo systemctl status postyml.service -exit 0 -################# Only for Missing rc.local ###################### END +################# POST YML FIX ###################### END