Difference between revisions of "Phpsessionclean.service (systemd service)"

From wikieduonline
Jump to navigation Jump to search
 
(32 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[systemctl cat]] phpsessionclean
+
{{lowercase}}
<pre>
+
<code>phpsessionclean[[.service]]</code> is a [[Systemd services|systemd service]] in [[Ubuntu]] that executes <code>[[/usr/lib/php/sessionclean]]</code> <code>[[sh]]</code> script to clean [[stale]] [[php sessions]]. It is run every 30 minutes by [[phpsessionclean.timer]].
# /lib/systemd/system/phpsessionclean.service
+
 
 +
* <code> [[systemctl cat]] phpsessionclean</code> or <code>cat [[/lib/systemd/system/phpsessionclean.service]]</code>
 
  [Unit]
 
  [Unit]
 
  Description=Clean php session files
 
  Description=Clean php session files
 +
 +
[Service]
 +
[[Type]]=[[oneshot]]
 +
[[ExecStart]]=[[/usr/lib/php/sessionclean]]
 +
[[ProtectHome]]=true
 +
[[ProtectSystem]]=true
 +
[[PrivateTmp]]=true
 +
 +
To disable service:
 +
* <code>[[systemctl stop]] phpsessionclean.service</code>
 +
* <code>[[systemctl disable]] phpsessionclean.service</code>
 +
* <code>systemctl stop phpsessionclean.timer</code>
 +
* <code>systemctl disable phpsessionclean.timer</code>
  
[Service]
 
Type=oneshot
 
ExecStart=/usr/lib/php/[[sessionclean]]
 
ProtectHome=true
 
ProtectSystem=true
 
PrivateTmp=true
 
</pre>
 
  
 
== Activities ==
 
== Activities ==
* Execute <code>[[sessionclean]]</code> shell script to clean your [[PHP]] [[sessions]]
+
* Execute manually <code>[[sessionclean]]</code> shell script to clean your [[PHP]] [[sessions]]
 
 
  
 
== Related terms ==
 
== Related terms ==
* <code>[[sessionclean]]</code> shell script
 
 
* <code>[[systemd]]</code>: <code>[[systemctl]]</code>
 
* <code>[[systemd]]</code>: <code>[[systemctl]]</code>
* <code>[[cat]]</code>
+
* <code>[[phpsessionclean.timer]]</code>
  
 
== See also ==
 
== See also ==
 +
* {{PHP sessions}}
 
* {{PHP}}
 
* {{PHP}}
 
* {{systemctl}}
 
* {{systemctl}}

Latest revision as of 19:53, 11 December 2023

phpsessionclean.service is a systemd service in Ubuntu that executes /usr/lib/php/sessionclean sh script to clean stale php sessions. It is run every 30 minutes by phpsessionclean.timer.

[Unit]
Description=Clean php session files

[Service]
Type=oneshot
ExecStart=/usr/lib/php/sessionclean
ProtectHome=true
ProtectSystem=true
PrivateTmp=true

To disable service:

  • systemctl stop phpsessionclean.service
  • systemctl disable phpsessionclean.service
  • systemctl stop phpsessionclean.timer
  • systemctl disable phpsessionclean.timer


Activities[edit]

Related terms[edit]

See also[edit]

Advertising: