/ systenctl rc2.local 自動起動

systenctl rc2.local 自動起動

# vi /etc/rc2.local
      
#!/bin/bash
[実行したいコマンドを書く...]
      
# chmod +x /etc/rc2.local
      
# vi /usr/lib/systemd/system/rc2-local.service
      
[Unit]
Description=/etc/rc2.local Compatibility
Wants=network.target
      
[Service]
Type=oneshot
ExecStart=/etc/rc2.local
TimeoutSec=0
#StandardInput=tty
RemainAfterExit=yes
      
[Install]
WantedBy=multi-user.target
      
# ln -s /usr/lib/systemd/system/rc2-local.service /etc/systemd/system/multi-user.target.wants/
# systemctl --system daemon-reload
# systemctl enable rc2-local.service

— posted by くま at 05:36 pm   pingTrackBack [0]

この記事に対するコメントはありません

<< 2015.3 >>
SMTWTFS
1234567
8910 1112 13 14
1516 17 18 192021
2223 2425262728
293031    
 
























T: Y: ALL: Online:
ThemePanel
Created in 0.0611 sec.