Quick amnesic shutdown

This commit is contained in:
Bob Mottram 2016-07-28 20:12:39 +01:00
parent e65f91c74a
commit cafa67da40
1 changed files with 1 additions and 5 deletions

View File

@ -482,10 +482,6 @@ function mesh_amnesic {
echo '' >> /usr/bin/amnesic echo '' >> /usr/bin/amnesic
echo 'tomb slam all' >> /usr/bin/amnesic echo 'tomb slam all' >> /usr/bin/amnesic
echo '' >> /usr/bin/amnesic echo '' >> /usr/bin/amnesic
echo 'MY_USERNAME=$1' >> /usr/bin/amnesic
echo -n "${PROJECT_NAME}-image-mesh " >> /usr/bin/amnesic
echo '$MY_USERNAME amnesic' >> /usr/bin/amnesic
echo '' >> /usr/bin/amnesic
echo 'exit 0' >> /usr/bin/amnesic echo 'exit 0' >> /usr/bin/amnesic
chmod +x /usr/bin/amnesic chmod +x /usr/bin/amnesic
@ -499,7 +495,7 @@ function mesh_amnesic {
echo 'Type=oneshot' >> /etc/systemd/system/amnesic.service echo 'Type=oneshot' >> /etc/systemd/system/amnesic.service
echo 'RemainAfterExit=true' >> /etc/systemd/system/amnesic.service echo 'RemainAfterExit=true' >> /etc/systemd/system/amnesic.service
echo 'ExecStart=/bin/true' >> /etc/systemd/system/amnesic.service echo 'ExecStart=/bin/true' >> /etc/systemd/system/amnesic.service
echo "ExecStop=/usr/bin/amnesic $MY_USERNAME" >> /etc/systemd/system/amnesic.service echo "ExecStop=/usr/bin/amnesic" >> /etc/systemd/system/amnesic.service
echo '' >> /etc/systemd/system/amnesic.service echo '' >> /etc/systemd/system/amnesic.service
echo '[Install]' >> /etc/systemd/system/amnesic.service echo '[Install]' >> /etc/systemd/system/amnesic.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/amnesic.service echo 'WantedBy=multi-user.target' >> /etc/systemd/system/amnesic.service