Created
May 23, 2019 18:45
-
-
Save Mstaaravin/b9df2d13c25ad91611869c820bda0bf2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# https://devtidbits.com/2015/11/30/add-to-and-change-ubuntus-motd/ | |
printf " $(tput -T xterm bold)Name:$(tput -T xterm sgr0) $(hostname)\n" | |
printf " $(tput -T xterm bold)Role:$(tput -T xterm sgr0) {{ ROLE }}\n" | |
printf "\n" | |
printf " $(tput -T xterm bold)Services running on this server:\n$(tput -T xterm sgr0)" | |
printf " $(tput -T xterm bold)$(tput -T xterm setaf 6)awswatcher$(tput -T xterm sgr0) this service checks uploads from {{ ENV }}admin.domain.net on folder /home/{{ ENV }}{{ ROLE }}/api/public/media/uploads\"\n" | |
printf "\n" | |
printf " $(tput -T xterm bold)How to manage services on this server:\n$(tput -T xterm sgr0)" | |
printf " As a user \"{{ ENV }}{{ ROLE }}\" $(tput -T xterm bold)NOT$(tput -T xterm sgr0) {{ USER }} run:\n" | |
#printf " $(tput -T xterm bold)$(tput -T xterm setaf 6)su - socket $(tput -T xterm sgr0) (if you're logged with user {{ USER }} or root)\n" | |
printf "\n" | |
printf " $(tput -T xterm bold)$(tput -T xterm setaf 6)sudo systemctl status awswatcher$(tput -T xterm sgr0)\n" | |
printf "\n" | |
#printf " (you can use start, stop and restart instead \"status\")\n" | |
#printf " This server also have an EFS mountpoint on \#############\n" | |
#printf "\n" | |
printf " $(tput -T xterm bold)How change to user \"{{ ENV }}{{ ROLE }}\"$(tput -T xterm sgr0) (for example if you're login with user {{ USER }})\n" | |
printf "\n" | |
printf " $(tput -T xterm bold)$(tput -T xterm setaf 6)su - {{ ENV }}{{ ROLE }}$(tput -T xterm sgr0)\n" | |
printf "\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment