USB OFFLINE: Debian 11.7 buat /etc/rc.local

From OnnoWiki
Revision as of 06:13, 17 June 2023 by Onnowpurbo (talk | contribs) (Created page with "Edit /etc/rc.local vi /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Edit /etc/rc.local

vi /etc/rc.local
#!/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

Ijinkan untuk bisa di execute,

chmod +x /etc/rc.local

Reload systemd

systemctl daemon-reload

Restart /etc/rc.local

systemctl start rc-local

Cek status

systemctl status rc-local


● rc-local.service - /etc/rc.local Compatibility

    Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled)
   Drop-In: /usr/lib/systemd/system/rc-local.service.d
            └─debian.conf
    Active: active (exited)
      Docs: man:systemd-rc-local-generator(8)
   Process: 58756 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)