adds spoiler
This commit is contained in:
parent
13d8b2a921
commit
b631c46435
|
@ -268,7 +268,11 @@ We know that we can pass information from the service to the script, like we did
|
|||
Starting and stopping is a bit out of place here, because we won't stop `nginx` itself.
|
||||
We just need to remove the website or put a 'user is offline...' message in the `index.html` file.
|
||||
One script that does multiple things screams **functions** and **case**!
|
||||
A quick and dirty script can be seen below.
|
||||
Try to have a go a creating one from scratch!
|
||||
|
||||
<details>
|
||||
<summary>Spoiler warning</summary>
|
||||
|
||||
|
||||
```
|
||||
➜ ~ cat site-manager.sh
|
||||
|
@ -303,6 +307,8 @@ esac
|
|||
➜ ~
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
If we try out this script, as `sudo` because we need to modify files owned by other users, we get the following.
|
||||
It's a proof of concept but more than enough to continue with the service files.
|
||||
|
||||
|
|
Loading…
Reference in New Issue