Show Messages to Users

If you want to prompt users with a message before they install, upgrade, or un-install a package in Package Center, you can write these messages in the desc key in install_uifile, upgrade_uifile, or uninstall_uifile. Please refer to "WIZARD_UIFILES" for more information.

If you want to send a prompt message to users after they install, upgrade, un-install, start, or stop a package in Package Center, you can implement them into the $SYNOPKG_TEMP_LOGFILE variable in the related scripts. For example,

echo "Hello World!!" > $SYNOPKG_TEMP_LOGFILE

If you want to prompt users in the language specified in their DSM settings, you can refer to the $SYNOPKG_DSM_LANGUAGE variable for language abbreviation as shown in the scripts below:

case $SYNOPKG_DSM_LANGUAGE in
        chs)
            echo "简体中文" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        cht)
            echo "繁體中文" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        csy)
            echo "Český" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        dan)
            echo "Dansk" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        enu)
            echo "English" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        fre)
            echo "Français" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        ger)
            echo "Deutsch" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        hun)
            echo "Magyar" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        ita)
            echo "Italiano" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        jpn)
            echo "日本語" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        krn)
            echo "한국어" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        nld)
            echo "Nederlands" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        nor)
            echo "Norsk" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        plk)
            echo "Polski" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        ptb)
            echo "Português do Brasil" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        ptg)
            echo "Português Europeu" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        rus)
            echo "Русский" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        spn)
            echo "Español" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        sve)
            echo "Svenska" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        trk)
            echo "Türkçe" > $SYNOPKG_TEMP_LOGFILE 
        ;;
        *)
            echo "English" > $SYNOPKG_TEMP_LOGFILE 
        ;;
    esac

Please see the "scripts" and "Script Environment Variables" sections for more information.

Otherwise, you can use /usr/syno/bin/synodsmnotify to send messages to DSM users. For example, the strings “title” and “messages” are sent to the “administrators” group.

synodsmnotify @administrators title messages