Skip to content

Instantly share code, notes, and snippets.

@lowendscripts
Created June 25, 2018 13:49
Show Gist options
  • Select an option

  • Save lowendscripts/489c9583c60355e40f233b1c52ff671b to your computer and use it in GitHub Desktop.

Select an option

Save lowendscripts/489c9583c60355e40f233b1c52ff671b to your computer and use it in GitHub Desktop.
#! /bin/sh
mkdir -p /etc/systemd/system
mkdir -p /lib/systemd/system
cat >> /lib/systemd/system/vzfifo.service << EOF
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
[Unit]
Description=Tell that Container is started
ConditionPathExists=/proc/vz
ConditionPathExists=!/proc/bc
After=multi-user.target quotaon.service quotacheck.service
[Service]
Type=forking
ExecStart=/bin/touch /.vzfifo
TimeoutSec=0
RemainAfterExit=no
[Install]
WantedBy=multi-user.target
EOF
ln -s /lib/systemd/system/vzfifo.service /etc/systemd/system/vzfifo.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment