Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Add rc.local to Debian 9 Stretch

By editor , 15 May, 2018
Question

How to Add /etc/rc.local to Debian 9 Stretch ?

/etc/rc.local is depricated on debian 9.

You can try this to add it. (Not tested)

 

1) Create the file : /etc/systemd/system/rc-local.service

# nano /etc/systemd/system/rc-local.service

2) Copy this text.

[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

3) Create file : /etc/rc.local

# nano /etc/rc.local

5) Add this text to the file

#!/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.

exit 0

6) Make the script executable : /etc/rc.local

# chmod +x /etc/rc.local

7) Activate on boot

# systemctl enable rc-local

Tags

  • Linux
  • Server
Setup PPTP VPN Server on Debian/Ubuntu Linux

Comments

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer