1. Buat sebuah file di /etc/systemd/system/rc-local.service
nano /etc/systemd/system/rc-local.service
2. Tulis perintah dibawah ini.
[Unit]
Description=/etc/rc.local
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. Buat sebuah file rc.localnano /etc/rc.local 4. Tulis skrip berikut :#!/bin/sh -e
#
# rc.local
#
exit 0
simpan dengan nama rc.local 5. Ubah izin akses file rc.localchmod +x /etc/rc.local 6. Enable file rc.local saat bootsystemctl enable rc-local 7. Jalankan file rc.localsystemctl start rc-local.service 8. Cek status file rc.localsystemctl status rc-local.service
No comments:
Post a Comment