-
-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1763 from nextcloud/feature/cicd/build-lxc
Build LXC images in CICD pipeline
- Loading branch information
Showing
9 changed files
with
195 additions
and
117 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [[ ${EUID} -ne 0 ]]; then | ||
printf "Must be run as root. Try 'sudo %s'\n" "$( basename "$0" )" | ||
exit 1 | ||
fi | ||
|
||
if [[ " $* " =~ " "(--help|-h)" " ]] | ||
then | ||
echo 'Description: | ||
Generate notifications for all Nextcloud users | ||
Usage: | ||
nc-broadcast <short-message> [options] | ||
Arguments: | ||
short-message Short message to be sent to the user (max. 255 characters) | ||
Options: | ||
-l, --long-message=LONG-MESSAGE Long message to be sent to the users (max. 4000 characters) [default: ""] | ||
-h, --help Display this help message | ||
-q, --quiet Do not output any message | ||
-V, --version Display ncc/occ version | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
--no-warnings Skip global warnings, show command output only | ||
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug' | ||
exit 0 | ||
fi | ||
|
||
ncc user:list --output=json | jq -r 'keys[]' | while read -r user | ||
do | ||
echo "Sending notification to $user" | ||
ncc notification:generate "${@:2}" "$user" "$1" | ||
done | ||
echo "All users have been notified." |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.