Code: Select all
#!/bin/bash
#Kills thunderbird to prevent 90 s timer from systemd at shutdown
killall kdocker
killall thunderbird
chmod u=rwx /home/craig/bin/killTB
and I have tried two methods to get it to run at shutdown.First I simply tried making a symbolic link to
/etc/rc0.d/
but that didn't work and I think that might be the pre systemd methodSo I tried creating a filed called
/etc/systemd/system/shutdownTB.service
Where the contents is
Code: Select all
[unit]
Description=Kill Thunderbird on shutdown
[service]
Type=ones
RemainAfterExit=true
ExecStart=/bin/true
ExecStop=/home/craig/bin/killTB
user=nobody
[Install]
WantedBy=multi-user.target
systemctl enable shutdownTB
to try to make it 'work' but when I type systemctl status shutdownTB
I getCode: Select all
● shutdownTB.service
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Jun 16 00:37:40 craig-ThinkPad-T530 systemd[1]: [/etc/systemd/system/shutdownTB.service:1] Unknown section 'unit'. Ignoring.
Jun 16 00:37:40 craig-ThinkPad-T530 systemd[1]: [/etc/systemd/system/shutdownTB.service:4] Unknown section 'service'. Ignoring.
Jun 16 00:37:40 craig-ThinkPad-T530 systemd[1]: shutdownTB.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.
ExecStart
and ExecStart
in my file.Here is the output of
inxi -Fxz
Code: Select all
System: Host: craig-ThinkPad-T530 Kernel: 4.13.0-41-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.4.6 (Gtk 3.18.9-1ubuntu3.3) Distro: Linux Mint 18.2 Sonya
Machine: System: LENOVO (portable) product: 2359CTO v: ThinkPad T530
Mobo: LENOVO model: 2359CTO Bios: LENOVO v: G4ET97WW (2.57 ) date: 10/17/2013
CPU: Dual core Intel Core i5-3230M (-HT-MCP-) cache: 3072 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10375
clock speeds: max: 3200 MHz 1: 2864 MHz 2: 2860 MHz 3: 2619 MHz 4: 2877 MHz
Graphics: Card: Intel 3rd Gen Core processor Graphics Controller bus-ID: 00:02.0
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.00hz
GLX Renderer: Mesa DRI Intel Ivybridge Mobile GLX Version: 3.0 Mesa 12.0.6 Direct Rendering: Yes
Audio: Card Intel 7 Series/C210 Series Family High Definition Audio Controller
driver: snd_hda_intel bus-ID: 00:1b.0
Sound: Advanced Linux Sound Architecture v: k4.13.0-41-generic
Network: Card-1: Intel 82579LM Gigabit Network Connection driver: e1000e v: 3.2.6-k port: 6080 bus-ID: 00:19.0
IF: enp0s25 state: down mac: <filter>
Card-2: Realtek RTL8188CE 802.11b/g/n WiFi Adapter driver: rtl8192ce port: 4000 bus-ID: 03:00.0
IF: wlp3s0 state: up mac: <filter>
Drives: HDD Total Size: 500.1GB (6.2% used) ID-1: /dev/sda model: CT500MX500SSD1 size: 500.1GB
Partition: ID-1: / size: 89G used: 22G (26%) fs: ext4 dev: /dev/sda5
ID-2: swap-1 size: 8.27GB used: 0.00GB (0%) fs: swap dev: /dev/sda6
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 50.0C mobo: N/A
Fan Speeds (in rpm): cpu: 1852
Info: Processes: 201 Uptime: 14 min Memory: 1282.0/7677.8MB Init: systemd runlevel: 5 Gcc sys: 5.4.0
Client: Shell (bash 4.3.481) inxi: 2.2.35