Auto start script di ubuntu

Langsung saja.


Misal mau buat autostart service xampp.

Bikin script file di direktory  "/etc/init.d/" seperti dibawah :

==============
#!/bin/bash
cd /opt/lampp
./xampp start
exit 0
==============

change permission ke 755

Kemudian ketik command berikut :

root@frog:/etc/init.d# update-rc.d xampp defaults
update-rc.d: warning: /etc/init.d/xampp missing LSB information
update-rc.d: see
 Adding system startup for /etc/init.d/xampp ...
   /etc/rc0.d/K20xampp -> ../init.d/xampp
   /etc/rc1.d/K20xampp -> ../init.d/xampp
   /etc/rc6.d/K20xampp -> ../init.d/xampp
   /etc/rc2.d/S20xampp -> ../init.d/xampp
   /etc/rc3.d/S20xampp -> ../init.d/xampp
   /etc/rc4.d/S20xampp -> ../init.d/xampp
   /etc/rc5.d/S20xampp -> ../init.d/xampp
root@frog:/etc/init.d#

Comments

Popular Posts