On 12/15/2011 11:48 AM, Michal Schmidt wrote:
If dsmcad is indeed forking, the type is correct. Don't lie to systemd.
If dsmcad indeed creates no PID file, it's correct to not have the PIDFile= entry.
If the main PID guessing can go wrong (for double-forking daemons that can happen),
GuessMainPID=no is the right option to set.
I see nothing wrong with that.
I stand corrected and on top that for some weird reason the unit similar
to what he was using works now
[Unit]
Description=Tivoly Storage Manager Client
After=network.target
[Service]
Type=forking
Environment=DSM_LOG=/var/log/tsm
ExecStart=/usr/bin/dsmcad
GuessMainPID=no
[Install]
WantedBy=multi-user.target
# systemctl start tsm-client.service && systemctl status
tsm-client.service && ps aux | grep dsmcad && netstat -pant | grep dsmcad
tsm-client.service - Tivoly Storage Manager Client
Loaded: loaded (/lib/systemd/system/tsm-client.service; disabled)
Active: active (running) since Thu, 15 Dec 2011 12:08:32 +0000;
7ms ago
Process: 7723 ExecStart=/usr/bin/dsmcad (code=exited,
status=0/SUCCESS)
CGroup: name=systemd:/system/tsm-client.service
├ 7724 [dsmcad]
└ 7726 /usr/bin/dsmcad
root 7726 0.0 0.1 310576 3044 ? Sl 12:08 0:00
/usr/bin/dsmcad
root 7728 0.0 0.0 109240 884 pts/0 S+ 12:08 0:00 grep
--color=auto dsmcad
tcp 0 0 0.0.0.0:1581
0.0.0.0:* LISTEN 7726/dsmcad
tcp 0 0 0.0.0.0:56494
0.0.0.0:* LISTEN 7726/dsmcad
# systemctl stop tsm-client.service && systemctl status
tsm-client.service && ps aux | grep dsmcad && netstat -pant | grep dsmcad
tsm-client.service - Tivoly Storage Manager Client
Loaded: loaded (/lib/systemd/system/tsm-client.service; disabled)
Active: inactive (dead) since Thu, 15 Dec 2011 12:09:53 +0000;
8ms ago
Process: 7723 ExecStart=/usr/bin/dsmcad (code=exited,
status=0/SUCCESS)
CGroup: name=systemd:/system/tsm-client.service
I cant explain why it did not work earlier this morning I guess blaming
it on a lack of coffee is as an good excuse as any.
JBG
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel