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

From wikieduonline
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
Phpsessionclean is a [[systemd]] service in [[Ubuntu]] that executes <code>[[/usr/lib/php/sessionclean]]</code> script to clean [[stale]] [[php sessions]]. It is run every 30 minutes by [[phpsessionclean.timer]].
+
{{lowercase}}
 
+
<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]].
  
 
* <code> [[systemctl cat]] phpsessionclean</code> or <code>cat [[/lib/systemd/system/phpsessionclean.service]]</code>
 
* <code> [[systemctl cat]] phpsessionclean</code> or <code>cat [[/lib/systemd/system/phpsessionclean.service]]</code>
Line 12: Line 12:
 
  [[ProtectSystem]]=true
 
  [[ProtectSystem]]=true
 
  [[PrivateTmp]]=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>
 +
  
 
== Activities ==
 
== Activities ==
Line 17: Line 24:
  
 
== 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>
 
* <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: