reload_flag=""
if [[ -n "${DEBUG}" ]]; then
reload_flag="--reload"
fi
if [[ -n "${WORKER_COUNT}" ]]; then
workers=${WORKER_COUNT}
else
workers=2
fi
gunicorn --workers ${workers} \
--bind 0.0.0.0:8000 \
${reload_flag} main.wsgi
Писали такие конструкции чтобы проверить наличие флага и сформировать команду правильно?
На самом деле можно сделать тоже самое проще. Для этого используются операторы условной подстановки, доступные в оболочках семейства POSIX.
:- для установки значений по умолчанию
${WORKER_COUNT:-2}
Если переменная не объявлена, то будет дефолтное значение 2.
:+ подставляет указанный текст, если переменная не пуста
${DEBUG:+--reload}
Если что-то есть в переменной то распечатается текст после символа +, в противном случае - ничего. Удобно для опциональных флагов, как в нашем примере.
Итого наш скрипт может выглядеть так:
gunicorn --workers ${WORKER_COUNT:-2} \
--bind 0.0.0.0:8000 \
${DEBUG:+--reload} main.wsgi
Есть еще два оператора.
:= не только подставить дефолтное значение, но и присвоить его переменной, если она пуста
# никаких переменных еще нет
VAL1=${VAL2:=hello}
# теперь доступны обе
echo $VAL1 $VAL2
# hello hello
:? остановить выполнение с ошибкой, если переменной нет.
echo ${MISS:?is required}
bash: MISS: is required
Код выхода будет 1.
#tricks#linux
#Ethiopia reportedly hosting #RSF training camp, Reuters investigation finds
Ethiopia is hosting a training camp for fighters linked to Sudan’s Rapid Support Forces (RSF) paramilitary group, according to an investigative report by Reuters citing multiple diplomatic, security, and government sources, allegations that could signal deeper regional involvement in Sudan’s ongoing civil war. Ethiopian authorities have not publicly responded to the claims.
The Reuters investigation, based on interviews with 15 sources including Ethiopian officials, diplomats, and security personnel, as well as satellite imagery analysis, alleges the camp is located in the remote western Benishangul-Gumuz region near the Sudan border. The report said the facility may provide the RSF with new recruits as fighting continues in Sudan.
According to Reuters, eight sources, claimed the UAE financed construction of the site and provided logistical and training support.
https://addisstandard.com/?p=55125
Drone strike kills six relatives of #Sudan Shield commander in Al-Jazira
Addis Abeba - A drone strike in central Sudan has killed six members of the family of Sudan Shield Forces commander Abu Agla Keikal.
Local sources told Sudan Tribune that the strike, suspected to have been carried out by the Rapid Support Forces (#RSF), targeted Keikal’s family home in Al-Kahli Zaidan village, eastern Al-Jazira State, on Saturday evening.
Witnesses told the outlet that a drone hovered over the area before launching multiple missiles at the residence. Among those killed was Major Azzam Keikal, described as a senior figure within the Sudan Shield Forces and the commander’s brother.
https://www.facebook.com/AddisstandardEng/posts/pfbid029L9AjQTCLmzRapcquiuyCCCKyNxKWd7f6ZVfBy3YV4PFHSbcAviL3REGM5NnbPzMl
#Sudan - doctors report ethnic killings and cholera outbreak in #RSF El Fasher detention centers
Sudanese doctors have reported systemic, ethnically motivated killings and a devastating cholera outbreak within detention centers run by the Rapid Support Forces (RSF) in El Fasher, North Darfur.
The RSF seized control of the historic Darfur capital on October 26, 2025, after an 18-month siege. Since the takeover, rights groups have documented widespread abuses, including summary executions, looting, and sexual violence.
A report by the Sudan Doctors Network covering January to April 2026 found that hundreds of civilians, including women and children, remain in custody. The group alleged that detainees face torture, interrogation, and execution based on their ethnicity.
According to data collected by the network, the RSF is currently holding approximately 907 military prisoners and 1,470 civilian detainees.
https://sudantribune.com/article/313225
#Sudan's #RSF sentences defecting commander Al-Qubba to death in absentia, strips military rank
Addis Abeba- The commander of the Rapid Support Forces (RSF), Mohamed Hamdan “Hemetti” Dagalo, on Thursday stripped defected Major General Al-Nour Ahmed Adam, known as “Al-Qubba,” of his military rank and sentenced him to death in absentia.
The decision follows accusations of desertion and collaboration with the Sudanese army. Al-Qubba defected earlier this month following internal disputes regarding his exclusion from the military leadership of North Darfur after the RSF took control of El Fasher in October 2025.
Internal sources cited by Sudan Tribune described Al-Qubba’s frustration over the appointment of Gedo Ibnshook as commander in North Darfur, rather than him. He also reportedly complained of discrimination against his specific forces and a lack of logistical support.
https://www.facebook.com/AddisstandardEng/posts/pfbid0hVzUm9gZ478RoV4aXRsPhFuSyGEJUbxn1c1S9s5gJsdV4uANUFWdVoW6uJM6dbt4l
#Sudan: Gen. al-Burhan receives defecting #RSF senior commander “Al-Qubba” in Northern State
Addis Abeba - The head of Sudan’s Sovereignty Council, Abdel Fattah al-Burhan, on Sunday received a senior commander who defected from the paramilitary Rapid Support Forces (RSF) in the country’s Northern State, in what analysts describe as one of the most significant breakaways from the group in recent months.
Major General Al-Nour Ahmed Adam, widely known as “Al-Qubba,” arrived in Dongola after fleeing the Kutum locality in North Darfur. His defection marks a notable shift in allegiances within the RSF amid Sudan’s ongoing conflict, which erupted in April 2023.
According to reports by Al Jazeera and Al Arabiya, Burhan, alongside senior military officials, formally welcomed Al-Qubba and his accompanying forces.
https://www.facebook.com/AddisstandardEng/posts/pfbid0zERwBt4PM8Xr7LZbL3dsMXMNBBPhtcUvsHgG8a3Bqf18T2zUVtg822un1kpi6Q97l
#press_freedom_index
#RSF
#КультМедиа
Всемирный индекс свободы прессы-2024, отчёт RSF, «Репортёры без границ»
Самая свободная пресса в Скандинавии: возглавляют рейтинг Норвегия, Дания и Швеция соответственно
Среди стран ЦА лидирует Кыргызстан на 120 месте, был на 122
Узбекистан опустился на 11 позиций и занимает сейчас 148 строчку
Таджикистан на 155 месте (минус две позиции за год)
Туркменистан на 175 позиции, был на 176 месте, в десятке стран с наихудшей ситуацией со свободой прессы
Ниже Туркменистана в рейтинге только Иран, Северная Корея, Афганистан, Сирия и Эритрея
Украина за год поднялась на 18 позиций и заняла 61 место
Россия заняла 162 место из 180, поднявшись на две позиции, но это не связано с улучшением ситуации в стране, а вызвано ухудшением в других государствах
Казахстан переместился вниз сразу на восемь позиций с 134 на 142 место, таким образом, ближайшими соседями стали Эфиопия и Ливия
материал azattyq
Найдите свою страну на карте свободы прессы
t.me/cult_media
News: More than eight million #Sudanese children miss nearly 500 days of schooling as war drags on
More than eight million children across Sudan have been deprived of education for nearly 500 days due to the ongoing war between the Sudanese Armed Forces and the Rapid Support Forces (#RSF), Save the Children warned on Wednesday.
The conflict, which erupted in April 2023, has triggered one of the longest school closures globally, surpassing even the prolonged shutdowns experienced during the COVID-19 pandemic.
According to the report, nearly half of Sudan’s estimated 17 million school-aged children have been unable to attend classes for about 484 days.
Save the Children said the education crisis has affected the entire country, with many schools remaining closed, others damaged by fighting, and some repurposed as shelters for families displaced by violence.
North Darfur has been among the hardest-hit regions, with only about three...
https://x.com/addisstandard/status/2014570940173066575?s=20
News: #Ethiopia revokes independent news outlet Addis Standard's license
Ethiopia on Tuesday revoked the licence of independent online outlet Addis Standard saying it harmed national interests, in the latest curb on press freedom.
Africa's second most populous nation with around 130 million inhabitants ranks 145th out of 180 in the press freedom index compiled by Reporters Without Borders (#RSF).
According to a statement posted on Facebook by the Ethiopian Media Authority (#EMA), whose director is appointed by the lower house of parliament, Addis Standard "has been repeatedly disseminating reports that violate media ethics, Ethiopian laws, and endanger the national interests of the country and its people".
It said Addis Standard had ignored several warnings "to correct its course & refrain from its detrimental practices".
"Therefore... the registration certificate of Addis Standard...
https://web.facebook.com/AddisstandardEng/posts/pfbid0sNz3qSXGZZKVNkSg7obqjJkx5JHkWnmPbwUsa81CCgZMCRWjG2xoiDUXZaoRm3Pbl
News: New report links $24 million #Dubai property empire to #Sudan’s #RSF leadership
The report, released in April 2026, found that “a network of family members, sanctioned individuals, and entities linked to the leadership of Sudan’s brutal Rapid Support Forces (RSF) militia owns a $24 million real estate portfolio in Dubai consisting of over 20 properties.”
The RSF is led by Mohamed Hamdan Dagalo, widely known as Hemedti, alongside his brothers Abdelrahim and Algoney Dagalo, all of whom have been sanctioned by the United States and European Union.
https://addisstandard.com/?p=56706
#Khartoum resumes school year after three-year war-induced hiatus
Schools in Khartoum state reopened this week after a three-year hiatus caused by #Sudan’s civil war, as officials scramble to repair hundreds of damaged buildings and accommodate a surge in returning students.
The Khartoum State Ministry of Education said on Monday that approximately 280 schools in the capital were damaged or destroyed during the conflict, which broke out in April 2023 between the Sudanese army and the paramilitary Rapid Support Forces (#RSF).
Many schools were repurposed as shelters for displaced families or occupied by warring factions, while the displacement of teachers & students led to a total collapse of the city’s educational system.
Qariballah Mohammed Ahmed, Khartoum’s director of education, told Sudan Tribune that more than one million students are expected to enrol this year as families gradually return to the capital’s relatively stable neighbourhoods.
“The number of...
https://sudantribune.com/article/311035