Skip to content

Commit b06a738

Browse files
committed
Added menu for script templates
1 parent e225704 commit b06a738

File tree

7 files changed

+338
-73
lines changed

7 files changed

+338
-73
lines changed

CHANGELOG

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
AutoPilot Release Notes
22

3+
Previously unpublished release
4+
5+
- Deutsch
6+
- Es wurde ein neues Menü für -benutzerdefinierte Script Templates-, sowie ein erstes, einfaches Script-Template hinzugefügt.
7+
- Der Begriff -DiskStation- wurde in allen Texten durch den Begriff -Synology NAS- ausgetauscht.
8+
9+
- English
10+
- A new menu for -user-defined script templates- and a first, simple script template have been added.
11+
- The term -DiskStation- has been replaced by the term -Synology NAS- in all texts.
12+
13+
314
Version 1.1-600 vom 17.03.2024
415

516
- Deutsch

ui/execute.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ if [ -h "/usr/local/bin/${app}" ] && [[ "${result}" =~ "running" ]]; then
220220
# Execute autopilot script
221221
IFS="
222222
"
223-
${scriptfile} "${log}"
223+
${scriptfile} "${log}" "${device}" "${mountpoint}" "${uuid}"
224224
exit_script=${?}
225225
IFS="${backupIFS}"
226226

ui/lang/gui/lang_gui_enu.txt

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ txt_help_permissions_expand_terminal="Expand app permissions using the console"
5757
txt_help_permissions_revoke_terminal="Revoke app permissions via the console"
5858
txt_help_permissions_expand_dsm="Expand app permissions via DSM Task Scheduler"
5959
txt_help_permissions_revoke_dsm="Revoke app permissions via DSM Task Scheduler"
60-
txt_help_permissions_step_1="Login to your DiskStations console as user <span class=\"text-danger fst-italic\">root</span> and run the following command"
60+
txt_help_permissions_step_1="Login to your Synology NAS console as user <span class=\"text-danger fst-italic\">root</span> and run the following command"
6161
txt_help_permissions_step_2="In DSM under <span class=\"text-danger fst-italic\">Main Menu</span> > <span class=\"text-danger fst-italic\">Control Panel</span> open the <span class=\"text-danger fst-italic\">Task Scheduler</span>."
6262
txt_help_permissions_step_3="In the task scheduler, use the <span class=\"text-danger fst-italic\">Create</span> > <span class=\"text-danger fst-italic\">Scheduled Task</span> > <span class=\"text-danger fst-italic\">Custom Script</span> off."
6363
txt_help_permissions_step_4="In the pop-up window that opens, enter <span class=\"text-danger fst-italic\">General</span> > <span class=\"text-danger fst-italic \">General settings</span> for the task and select <span class=\"text-danger fst-italic\">root</span> as the user. Then uncheck <span classS=\"text-danger fst-italic\">Enabled</span>."
@@ -107,7 +107,7 @@ txt_autopilot_is_not_installed="not installed"
107107

108108
txt_autopilot_create_disk_01="In the following, an empty file with the name <span class=\"text-secondary\">autopilot</span> is first created for the automatic detection and execution of <span class=\"text-secondary\">shell scripts</span> on the external disk <span class=\"text-secondary\">"
109109
txt_autopilot_create_disk_02="</span>. The disk identification number <span class=\"text-secondary\">"
110-
txt_autopilot_create_disk_03="</span> is used to establish a unique connection to the <span class=\"text-secondary\">shell script</span> that is actually to be executed, whose name and path must be specified in the following form. If the <span class=\"text-secondary\">Shell script</span> on an internal volume of the DiskStation ensures that the content cannot be viewed or manipulated by unauthorized persons."
110+
txt_autopilot_create_disk_03="</span> is used to establish a unique connection to the <span class=\"text-secondary\">shell script</span> that is actually to be executed, whose name and path must be specified in the following form. If the <span class=\"text-secondary\">Shell script</span> on an internal volume of the Synology NAS ensures that the content cannot be viewed or manipulated by unauthorized persons."
111111
txt_autopilot_sharedfolder_label="Shared Folder"
112112
txt_autopilot_targetfolder_label="Target folder (optional)"
113113
txt_autopilot_targetfolder_note="An additional target directory can be specified. The use of additional subdirectories, which are separated by a <span class=\"text-blue\">/</span> (slash), is possible. If the target directory does not exist , it will be created automatically. Invalid characters in directory names are <span class=\"text-blue\">~ &#34; &#35; &#37; &#38; &#42; &#58; &# 60; &#62; &#63; &#47; &#92; &#123; &#124; &#125;</span>"
@@ -133,7 +133,7 @@ txt_autopilot_disconnect="After executing the linked shell script file, remove t
133133
txt_autopilot_disconnect_never="never eject"
134134
txt_autopilot_disconnect_auto="only eject if the task was processed without errors by an <span class=\"text-success\">exit 0</span> return value"
135135
txt_autopilot_disconnect_manual="always eject if the task was manually terminated by an <span class=\"text-success\">exit 100</span> return value"
136-
txt_autopilot_signal="Trigger visual and audible signals from your DiskStation while AutoPilot is running"
136+
txt_autopilot_signal="Trigger visual and audible signals from your Synology NAS while AutoPilot is running"
137137

138138
txt_external_disks_header="External disks"
139139
txt_external_disks_not_found="No external disk connected"
@@ -147,10 +147,11 @@ txt_autopilot_select_external_disk="Select external disk"
147147
txt_autopilot_note_script_overwrite="<span class=\"text-danger\">Note: </span>Only shell scripts can be selected that have been previously connected to an external storage medium. <span class=\"text-danger fst-italic\">Already existing file contents will be overwritten without asking!</span>"
148148

149149
txt_autopilot_change_note_step_1="<span class=\"text-danger fst-italic\">Important note:</span> From AutoPilot version 1.1-000 <span class=\"text-danger fst-italic\">the content of the autopilot script file is no longer executed</span>, but only checked whether there is an empty file with the name autopilot on the external storage medium."
150-
txt_autopilot_change_note_step_2="Please move the contents of the current autopilot script file to a location within a shared folder on your DiskStation, give the file a new, unique name and make sure to use <span class=\"text-danger fst-italic\"> as the file extension .sh</span>. Then delete the autopilot script file from this external storage medium."
150+
txt_autopilot_change_note_step_2="Please move the contents of the current autopilot script file to a location within a shared folder on your Synology NAS, give the file a new, unique name and make sure to use <span class=\"text-danger fst-italic\"> as the file extension .sh</span>. Then delete the autopilot script file from this external storage medium."
151151

152152
txt_autopilot_updateinfo_disable="Hide information"
153153
txt_autopilot_update_scriptcontent="Script content has been revised. Please resubmit selected jobs to a shell script."
154+
txt_autopilot_update_custom_scriptcontent="Template content has been revised."
154155

155156
# Basic backup
156157
txt_basicbackup_header="Basic Backup jobs"
@@ -192,13 +193,35 @@ txt_hyperbackup_purge_finished="Cleanup completed"
192193
txt_hyperbackup_purge_duration="Duration of cleanup job"
193194
txt_hyperbackup_purge_pid_not_found="No process identifier (PID) found for cleanup job"
194195

196+
# Custom Template Scripts
197+
txt_customscripts_header="Custom Script Templates"
198+
txt_customscripts_simple="A simple AutoPilot Script Template"
199+
txt_customscripts_title_view_script="View AutoPilot script file for this custom script template"
200+
txt_customscripts_package_name="Package name"
201+
txt_customscripts_create_this_script="Pass this script template to a shell script for further processing"
202+
203+
# Custom Template script log - General
204+
txt_customscripts_execute="A custom script is executed"
205+
txt_customscripts_script_name="Scriptname"
206+
txt_customscripts_disk_read_out="Attention: The external disk bound to this script is read out."
207+
txt_customscripts_check_logfile="Check if argument given for log, otherwise redirect to"
208+
txt_customscripts_check_device="Check if argument given for the device name of the external disk, otherwise abort script"
209+
txt_customscripts_check_mountpoint="Check if argument given for the mountpoint of the external disk, otherwise abort script"
210+
txt_customscripts_check_uuid="Check if argument given for the uuid of the external disk, otherwise abort script"
211+
txt_customscripts_check_example="For example:"
212+
txt_customscripts_begin_script="Start entering your custom script here"
213+
txt_customscripts_script_evaluation="Attention: The result of the script execution is evaluated."
214+
txt_customscripts_no_changes="Please do not make any changes here."
215+
txt_customscripts_finished="The custom script has been executed"
216+
txt_customscripts_duration="Duration of execution"
217+
195218
# udev_device_driver.sh
196219
# ------------------------------------------------- -------------
197220
txt_help_status_install_terminal="Install device drivers via console"
198221
txt_help_status_uninstall_terminal="Uninstall device drivers via console"
199222
txt_help_status_install_dsm="Install device drivers via DSM Task Scheduler"
200223
txt_help_status_uninstall_dsm="Uninstall device drivers via DSM Task Scheduler"
201-
txt_help_status_step_1="Log in as user <span class=\"text-danger fst-italic\">root</span> on your DiskStations console and run the following command"
224+
txt_help_status_step_1="Log in as user <span class=\"text-danger fst-italic\">root</span> on your Synology NAS console and run the following command"
202225
txt_help_status_step_2="Open in the DSM under <span class=\"text-danger fst-italic\">Main Menu</span> > <span class=\"text-danger fst-italic\">Control Panel</span> > <span class=\"text-danger fst-italic\">Task Scheduler</span>."
203226
txt_help_status_step_3="In the task planner, select <span class=\"text-danger fst-italic\">Create</span> > <span class=\"text-danger fst-italic\">Scheduled task</span> > <span class=\"text-danger fst-italic\">Custom script</span>."
204227
txt_help_status_step_4="In the pop-up window that now opens, enter <span class=\"text-danger fst-italic\">General</span> > <span class=\"text-danger fst-italic \">General Settings</span> give the task an individual name and select <span class=\"text-danger fst-italic\">root</span> as the user. Then you uncheck the <span class =\"text-danger fst-italic\">Enabled</span>."
@@ -224,7 +247,7 @@ txt_popup_delete_logfile="Do you really want to delete the contents of the log?"
224247
# ------------------------------------------------- -------------
225248
txt_help_setup_dsm_step_1="Install the <span class=\"text-danger fst-italic\">Text Editor</span> from the DSM Package Center."
226249
txt_help_setup_dsm_step_2="Open the text editor and use the button to create <span class=\"text-danger fst-italic\">File</span> > <span class=\"text-danger fst-italic\">New </span> a new text or <span class=\"text-danger fst-italic\">shell script file</span>. Now start writing the actual shell script."
227-
txt_help_setup_dsm_step_3="Then save the shell script file you just created using the <span class=\"text-danger fst-italic\">File</span> > <span class=\"text-danger fst-italic\"> button Save as...</span>, select a location within a shared folder on your DiskStation, give the file a unique name and use <span class=\"text-danger fst-italic\">.sh</span> as the file extension. Confirm your entries by pressing the <span class=\"text-danger fst-italic\">Save</span> button."
250+
txt_help_setup_dsm_step_3="Then save the shell script file you just created using the <span class=\"text-danger fst-italic\">File</span> > <span class=\"text-danger fst-italic\"> button Save as...</span>, select a location within a shared folder on your Synology NAS, give the file a unique name and use <span class=\"text-danger fst-italic\">.sh</span> as the file extension. Confirm your entries by pressing the <span class=\"text-danger fst-italic\">Save</span> button."
228251
txt_help_setup_dsm_step_4="To ensure that the shell script file has the <span class=\"text-danger fst-italic\">Run</span> attribute, open the <span class=\"text-danger fst-italic\">File Station</span> and switch to the corresponding storage location. By right-clicking on the file, call up the <span class=\"text-danger fst-italic\">context menu</span> and select the item <span class=\"text-danger fst-italic\">Properties</span>."
229252
txt_help_setup_dsm_step_5="You will be offered several checkboxes in the <span class=\"text-danger fst-italic\">Authorization</span> tab, which you can read about -, Write and Execute permission</span> for <span class=\"text-danger fst-italic\">Owner, Group and Other</span>, then make sure the <span class=\"text -danger fst-italic\">all</span> checkboxes are checked. Save possible changes afterwards using the <span class=\"text-danger fst-italic\">Save</span> button."
230253
txt_help_setup_dsm_step_6="If the checkboxes just mentioned are not offered to you in the <span class=\"text-danger fst-italic\">Authorization</span> tab, then create one using the button <span class=\"text-danger fst-italic\">Create</span> a new permission. Select from the selection menu under <span class=\"text-danger fst-italic\">User or Group</span>, Everyone and under <span class=\"text-danger fst-italic\">Type</span>, Allow. Check all checkboxes under Permissions <span class=\"text-danger fst-italic\">Administration, reading and writing</span> and click on the <span class=\"text-danger fst-italic\">Done</span> button. Then save your changes using the <span class=\"text-danger fst-italic\">Save</span> button."
@@ -233,8 +256,8 @@ txt_help_setup_dsm_step_8="Eject the external storage device via the DSM. The ne
233256

234257
# setup_via_terminal.sh
235258
# ------------------------------------------------- -------------
236-
txt_help_setup_terminal_step_1="Log in as a user from the group of <span class=\"text-danger fst-italic\">administrators</span> or as a user <span class=\"text-danger fst-italic\"> root</span> on your DiskStations console."
237-
txt_help_setup_terminal_step_2="Switch to a location within a shared folder on your DiskStation e.g."
259+
txt_help_setup_terminal_step_1="Log in as a user from the group of <span class=\"text-danger fst-italic\">administrators</span> or as a user <span class=\"text-danger fst-italic\"> root</span> on your Synology NAS console."
260+
txt_help_setup_terminal_step_2="Switch to a location within a shared folder on your Synology NAS e.g."
238261
txt_help_setup_terminal_step_3="Create a new shell script file, give the file a unique name, use <span class=\"text-danger fst-italic\">.sh</span> as the file extension and adjust the file permissions accordingly. ( Important: The shell script file must always have the <span class=\"text-danger fst-italic\">Execute attribute</span>."
239262
txt_help_setup_terminal_step_4="There are several options available to fill the shell script file with content. One of them would be to use the editor <span class=\"text-danger fst-italic\">vim</span>."
240263
txt_help_setup_terminal_step_5="After calling vim, you will initially be in command mode. Therefore, the contents of the still empty file autopilot will only be displayed to you. In order to be able to enter text, you must press the [<span class=\"text-danger\"> i </span>] key. Switch to insert mode, i.e. text insertion mode (<span class=\"text-danger fst-italic\">Important:</span> do not enter any text beforehand!). Begin now with the input."
@@ -254,3 +277,4 @@ txt_help_setup_step_5="AutoPilot informs that, regardless of the exit code actua
254277

255278

256279

280+

0 commit comments

Comments
 (0)