Add systemd .service and .timer
							parent
							
								
									a330e8fa99
								
							
						
					
					
						commit
						7b6094917e
					
				@ -0,0 +1,7 @@
 | 
			
		||||
# /etc/systemd/system/sessioncommunities.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Scrape every known source for Session Communities and put the data to a NGINX accessible folder
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
User=session
 | 
			
		||||
ExecStart=/usr/bin/php get_online_session_communities.php
 | 
			
		||||
@ -0,0 +1,13 @@
 | 
			
		||||
# /etc/systemd/system/sessioncommunities.timer
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Run get_online_session_communitites.php periodically
 | 
			
		||||
 | 
			
		||||
[Timer]
 | 
			
		||||
OnBootSec=10min
 | 
			
		||||
OnUnitInactiveSec=45min
 | 
			
		||||
Persistent=true
 | 
			
		||||
User=session
 | 
			
		||||
Unit=sessioncommunities.service
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=timers.target
 | 
			
		||||
					Loading…
					
					
				
		Reference in New Issue