Skip to content

Commit

Permalink
Update 05a - Post YML Docker Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin9705 authored Sep 17, 2017
1 parent b2f4d62 commit 3bd4b98
Showing 1 changed file with 21 additions and 29 deletions.
50 changes: 21 additions & 29 deletions 05a - Post YML Docker Fix
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3bd4b98

Please sign in to comment.