Difference between revisions of "USB OFFLINE: Debian 11.7 buat /etc/rc.local"

From OnnoWiki
Jump to navigation Jump to search
(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...")
 
Line 34: Line 34:
 
  systemctl status rc-local
 
  systemctl status rc-local
  
 +
pastikan rc.local active
  
● rc-local.service - /etc/rc.local Compatibility
+
● rc-local.service - /etc/rc.local Compatibility
    Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled)
+
      Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled)
    Drop-In: /usr/lib/systemd/system/rc-local.service.d
+
    Drop-In: /usr/lib/systemd/system/rc-local.service.d
            └─debian.conf
+
              └─debian.conf
    Active: active (exited)
+
      Active: active (exited) since Sat 2023-06-17 08:56:49 WIB; 31s ago
      Docs: man:systemd-rc-local-generator(8)
+
        Docs: man:systemd-rc-local-generator(8)
    Process: 58756 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
+
      Tasks: 0 (limit: 4915)
 +
      Memory: 0B
 +
        CPU: 0
 +
      CGroup: /system.slice/rc-local.service
 +
 +
Jun 17 08:56:49 sekolah systemd[1]: Starting /etc/rc.local Compatibility...
 +
Jun 17 08:56:49 sekolah systemd[1]: Started /etc/rc.local Compatibility.

Revision as of 08:58, 17 June 2023

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

pastikan rc.local active

● 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) since Sat 2023-06-17 08:56:49 WIB; 31s ago
       Docs: man:systemd-rc-local-generator(8)
      Tasks: 0 (limit: 4915)
     Memory: 0B
        CPU: 0
     CGroup: /system.slice/rc-local.service

Jun 17 08:56:49 sekolah systemd[1]: Starting /etc/rc.local Compatibility...
Jun 17 08:56:49 sekolah systemd[1]: Started /etc/rc.local Compatibility.