Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Explore
Projects
Groups
CI/CD Catalog
Topics
Snippets
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Explore
Snippets
$250
Ubuntu - Script Reboot if needed
Code
Clone with SSH
Clone with HTTPS
Embed
Share
Snippet actions
The snippet can be accessed without any authentication.
Authored
1 year ago
by
RDR-IT
Edited
1 year ago
reboot-if-need.sh
79 B
1
2
3
4
5
#!/bin/bash
FILE
=
/var/run/reboot-required
if
[
-f
"
$FILE
"
]
;
then
reboot
fi
0
0
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment