Systemd dan rc.local di IGOS Nusantara: Perbedaan revisi

Dari IGNwiki
Langsung ke: navigasi, cari
Baris 13: Baris 13:
 
  # systemctl status rc-local.service
 
  # systemctl status rc-local.service
 
  rc-local.service - /etc/rc.d/rc.local Compatibility
 
  rc-local.service - /etc/rc.d/rc.local Compatibility
  Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static)
+
  Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static)
  Active: active (exited) since Thu, 28 Mar 2013 15:43:02 +0700; 12min ago
+
  Active: active (exited) since Thu, 28 Mar 2013 15:43:02 +0700; 12min ago
  CGroup: name=systemd:/system/rc-local.service
+
  CGroup: name=systemd:/system/rc-local.service

Revisi per 28 Maret 2013 08.55

IGOS Nusantara 7 dan 8 memakai systemd. Pada systemd secara default rc.local tidak dibuat.

Buat berkas /etc/rc.d/rc.local dan beri hak akses 755

# touch /etc/rc.d/rc.local
# chmod 755 /etc/rc.d/rc.local
# mkdir -p /home/cetak-menit/

Isi berkas /etc/rc.d/rc.local sebagai berikut

#!/bin/bash
date +"%Y-%m-%d_%T" > /home/cetak-menit/00-tanggal.txt

Periksa status rc-local

# systemctl status rc-local.service
rc-local.service - /etc/rc.d/rc.local Compatibility
	  Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static)
	  Active: active (exited) since Thu, 28 Mar 2013 15:43:02 +0700; 12min ago
	  CGroup: name=systemd:/system/rc-local.service