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

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(40 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[systemctl]] cat phpsessionclean
+
{{lowercase}}
# /lib/systemd/system/phpsessionclean.service
+
<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>
 
  [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
  
[Service]
+
To disable service:
Type=oneshot
+
* <code>[[systemctl stop]] phpsessionclean.service</code>
ExecStart=/usr/lib/php/[[sessionclean]]
+
* <code>[[systemctl disable]] phpsessionclean.service</code>
ProtectHome=true
+
* <code>systemctl stop phpsessionclean.timer</code>
ProtectSystem=true
+
* <code>systemctl disable phpsessionclean.timer</code>
PrivateTmp=true
+
 
 +
 
 +
== Activities ==
 +
* Execute manually <code>[[sessionclean]]</code> shell script to clean your [[PHP]] [[sessions]]
  
 +
== Related terms ==
 +
* <code>[[systemd]]</code>: <code>[[systemctl]]</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: