Changes

Jump to navigation Jump to search
665 bytes added ,  20:34, 4 July 2022
Line 219: Line 219:  
  mkdir -p  /etc/lib/systemd/system/'''servicename'''.service.d/
 
  mkdir -p  /etc/lib/systemd/system/'''servicename'''.service.d/
 
  printf "[Install]\nWantedBy=sme-server.target\n" > /etc/lib/systemd/system/'''servicename'''.service.d/50koozali.conf
 
  printf "[Install]\nWantedBy=sme-server.target\n" > /etc/lib/systemd/system/'''servicename'''.service.d/50koozali.conf
 +
systemctl daemon-reload
 
  /etc/e-smith/events/actions/systemd-default
 
  /etc/e-smith/events/actions/systemd-default
   Line 239: Line 240:  
  cd /etc/rc.d/rc7.d
 
  cd /etc/rc.d/rc7.d
 
  ln -s ../init.d/'''e-smith-service''' S85'''servicename'''
 
  ln -s ../init.d/'''e-smith-service''' S85'''servicename'''
 +
 +
====only run script in a daemontool runit /service/'''servicename''' folder====
 +
as previously replace servicename to the actual service name
 +
 +
<syntaxhighlight lang="bash" >printf "[Unit]
 +
Description=servicename
 +
Requires=runit.service
 +
 +
[Service]
 +
Type=oneshot
 +
ExecStartPre=/sbin/e-smith/service-status servicename
 +
ExecStart=/usr/bin/sv u /service/servicename
 +
ExecStop=/usr/bin/sv stop /service/servicename
 +
ExecReload=/usr/bin/sv t /service/servicename
 +
RemainAfterExit=yes
 +
 +
[Install]
 +
WantedBy=sme-server.target" > /etc/systemd/system/servicename.service
 +
systemctl daemon-reload
 +
/etc/e-smith//events/actions/systemd-default
 +
</syntaxhighlight>
    
==Packages==
 
==Packages==
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,250

edits

Navigation menu