Skip to content

Instantly share code, notes, and snippets.

@alexishida
Created September 6, 2018 12:32
Show Gist options
  • Select an option

  • Save alexishida/a92b0bc6e81bdb227970a2e08accc74b to your computer and use it in GitHub Desktop.

Select an option

Save alexishida/a92b0bc6e81bdb227970a2e08accc74b to your computer and use it in GitHub Desktop.
Enable / Create rc.local
sudo systemctl status rc-local
sudo systemctl enable rc-local
sudo nano /etc/systemd/system/rc-local.service
####### Copie os dados a baixo #####
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
######################################
printf '%s\n' '#!/bin/bash' 'exit 0' | sudo tee -a /etc/rc.local
sudo chmod +x /etc/rc.local
sudo systemctl enable rc-local
sudo systemctl start rc-local.service
sudo systemctl status rc-local.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment