-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathusing systemd
More file actions
53 lines (35 loc) · 939 Bytes
/
Copy pathusing systemd
File metadata and controls
53 lines (35 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cd /etc/systemd/system
here is the script's which are executed after system startup
let's look for ssh as example
cat # cat sshd.service
[Unit]
Description=OpenBSD Secure Shell server
After=network.target auditd.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
[Service]
EnvironmentFile=-/etc/default/ssh
ExecStartPre=/usr/sbin/sshd -t
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
ExecReload=/usr/sbin/sshd -t
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartPreventExitStatus=255
Type=notify
[Install]
WantedBy=multi-user.target
Alias=sshd.service
#TODO:
Let's write our own:
locale-set.service
[Unit]
Description=Kostul for locale settings
After=network.target auditd.service
[Service]
ExecStart=export LC_CTYPE="en_US.UTF-8"
ExecStart=export LC_ALL="en_US.UTF-8"
ExecStart=export LANG="en_US.UTF-8"
ExecStart=export LANGUAGE="en_US.UTF-8"
Type=notify
[Install]
Alias=locale-set.service