Linked Questions

1
vote
0answers
156 views

Systemd and SysVinit compatibility mode [duplicate]

Trying to reuse an existing "SysV" init script with new Linux version that uses "systemd" (RHEL 7). Just copying it into "/etc/init.d/" fails to work as expected. Can only manually Start/Stop service ...
291
votes
2answers
359k views

How to see full log from systemctl status service?

I check service status with systemctl status service-name. By default, I see few rows only, so I add -n50 to see more. Sometimes, I want to see full log, from start. It could have 1000s of rows. Now,...
51
votes
4answers
83k views

Execute a command before shutdown

I want to execute a simple command just before the computer shuts down (timing is not essential). For startup, I can use /etc/rc.local; is there something similar for shutdown? Note that I would ...
43
votes
3answers
36k views

Where do I put my systemd unit file?

Sometimes these things can be hard for first-timers. Being a do-it-myself person, I read that there are two folders for unit files (not in user mode). /usr/lib/systemd/system/: units provided by ...
22
votes
1answer
901 views

One systemctl command to both start and enable

Using one command to both start and enable systemctl managed software would be useful to spare a few lines in a few scripts, making them a bit more aesthetic (not really a problem but a nice thing to ...
10
votes
1answer
12k views

systemctl - service exit codes and status information explanation

When checking a service status via systemctl systemctl status docker the output is something like ● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/...
4
votes
3answers
27k views

How to permanently remove eth0.x in CentOS

I'm trying to remove eth0.x and keep eth0. While ifconfig lists both eth0.1 and eth0.500, I didn't find their configuration files /etc/sysconfig/network-scripts/ifcfg-eth0.x. I tried ifconfig eth0.1 ...
1
vote
3answers
3k views

davmail systemd launcher on headless server

I'm trying to follow the ArchWiki guide for writing a custom service file to launch DavMail as a system-wide daemon. Previously I had a line in my ~/.xinitrc that read nohup /usr/bin/davmail /etc/...
1
vote
3answers
2k views

Automount windows shared folder on Linux

I have a shared folder on windows and I usually mount it like this mkdir /media/somedir sudo mount -t cifs //servername/sharename /media/somedir The problem is that once I restart the machine the ...
1
vote
2answers
1k views

Script to create macvlan bridge on the host doesn't work unless it's run twice

I have a script that should create a macvlan bridge in the host when it starts up. The host is an up-to-date Arch Linux. This is intended to allow host and guest to share the same network. I found ...
0
votes
1answer
409 views

Run script at startup as root after everything has finished

I have an IoT device with a barebones Linux distro on it. No crontab, chkconfig, or update-rc. How would I go about running a script when the device has started, after everything on the device has ...
4
votes
2answers
98 views

Initiating an application after OS bootup, then restarting that application every hour thereafter

I'm looking for a method to start an application immediately after boot-up. This application times out after 1 hour. I'd like to then start another instance of this application 1 hour after the ...
-1
votes
1answer
100 views

execute commands automatically inside server at boot-time

Now I'm testing a Linux server; after the boot of the server machine I have to run these commands by SSH connection (with putty): cd ../var/www/html/tbl/libraries/solr/bin/ sudo bash solr ./solr ...
0
votes
0answers
28 views

rcX.d script not working

(OS: GalliumOS 2.1 (Ubuntu 16.04), Hw: Samsung Chromebook 2) Due to limited storage capacity in my computer, I set up a simple script, which looks more or less like this: #! /bin/sh # Documentation ...
0
votes
0answers
10 views

Netplan doesn't create default route

OVH cloud host allows an easy way to route multiple blocks of their IPs to virtual MACs on one interface. For example, eth0 has an address on the 40.30.20.0/24 network with a gateway of 40.30.20.254, ...