2024年4月26日金曜日

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

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

[Service]
Type=oneshot
ExecStart= /usr/local/sbin/httpgwd  stop
[Install]
WantedBy=shutdown.target

# systemctl daemon-reload
# systemctl enable drop.service

#---------------------------- socat -----------------------------
# dnf install socat
vi /etc/systemd/system/lpr-proxy.service <<__EOF__
[Unit]
Description=LPR Proxy Server
After=network.target

[Service]
ExecStart=/usr/bin/socat TCP4-LISTEN:515,fork TCP4:192.168.1.200:515
Restart=always
User=nobody
Group=nobody

[Install]
WantedBy=multi-user.target
__EOF__


sudo systemctl daemon-reload
sudo systemctl enable --now lpr-proxy

0 件のコメント:

コメントを投稿

データベースフィルドの書き換え

【書き換え】 select Fxxxx,replace( Fxxxx,'D:','C:') from Schema.Table where Fxxxx like 'D:\%' update Schema.Table set Fxx...