2017年4月4日火曜日

CentOS サービス自動起動

/etc/systemd/system/httpgwd.service
[Unit]
Description=HTTP Proxy deamon
After=network.target

[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/local/sbin/httpgwd 80 192.168.1.1:80
 
[Install]
WantedBy=multi-user.target



CentOS7のサービス確認
systemctl list-unit-files

0 件のコメント:

コメントを投稿

シャットダウン時の後処理 (shutdown)

# vi /etc/systemd/system/drop.service [Unit] Description= stop httpgwd DefaultDependencies=no Before=shutdown.target RefuseManualStart=true ...