What does %H:%i.pid do in a .service file?

Viewed 3090

Ok I have been looking all over the place and cannot find what this is doing. Below is a line from a .service file to start tightvnc on boot.

PIDFile=/home/username/.vnc/%H:%i.pid

I am assuming it is grabbing username:1.pid from the folder but I do not understand what the individual parts %H and %i are actually doing? I do know the rest of the script uses the %i in a couple other lines. specifically:

ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i
ExecStop=/usr/bin/vncserver -kill :%i

I am also unsure what the %H and %i operators are called making it hard to find them searching online. What I have been able to deduce is %H must be grabbing the username but I am unsure what number or numbers %i is grabbing.

the files in /usr/bin/vncserver are as follows with date strings:

May 26 16:04 username:1.log
May 26 15:56 username:1.pid
May 26 15:21 username:2.log
May 26 15:21 username:2.pid
May 26 15:21 username:3.log
May 26 15:21 username:3.pid
May 25 17:31 passwd
May 25 17:35 xstartup
May 25 17:32 xstartup.bak

The only reason I am adding the dates in there is because I know %H can stand for hours but I highly doubt that is what it represents here.

1 Answers
Related