diff --git a/conf/.env b/conf/.env new file mode 100644 index 0000000..72c62d9 --- /dev/null +++ b/conf/.env @@ -0,0 +1,52 @@ +# Redlib configuration +# See the Configuration section of the README for a more detailed explanation of these settings. + +# Instance-specific settings +# Enable SFW-only mode for the instance +REDLIB_SFW_ONLY=off +# Set a banner message for the instance +REDLIB_BANNER= +# Disable search engine indexing +REDLIB_ROBOTS_DISABLE_INDEXING=off +# Set the Pushshift frontend for "removed" links +REDLIB_PUSHSHIFT_FRONTEND=undelete.pullpush.io + +# Default user settings +# Set the default theme (options: system, light, dark, black, dracula, nord, laserwave, violet, gold, rosebox, gruvboxdark, gruvboxlight) +REDLIB_DEFAULT_THEME=system +# Set the default front page (options: default, popular, all) +REDLIB_DEFAULT_FRONT_PAGE=default +# Set the default layout (options: card, clean, compact) +REDLIB_DEFAULT_LAYOUT=card +# Enable wide mode by default +REDLIB_DEFAULT_WIDE=off +# Set the default post sort method (options: hot, new, top, rising, controversial) +REDLIB_DEFAULT_POST_SORT=hot +# Set the default comment sort method (options: confidence, top, new, controversial, old) +REDLIB_DEFAULT_COMMENT_SORT=confidence +# Enable blurring Spoiler content by default +REDLIB_DEFAULT_BLUR_SPOILER=off +# Enable showing NSFW content by default +REDLIB_DEFAULT_SHOW_NSFW=off +# Enable blurring NSFW content by default +REDLIB_DEFAULT_BLUR_NSFW=off +# Enable HLS video format by default +REDLIB_DEFAULT_USE_HLS=off +# Hide HLS notification by default +REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION=off +# Disable autoplay videos by default +REDLIB_DEFAULT_AUTOPLAY_VIDEOS=off +# Define a default list of subreddit subscriptions (format: sub1+sub2+sub3) +REDLIB_DEFAULT_SUBSCRIPTIONS= +# Define a default list of subreddit filters (format: sub1+sub2+sub3) +REDLIB_DEFAULT_FILTERS= +# Hide awards by default +REDLIB_DEFAULT_HIDE_AWARDS=off +# Hide sidebar and summary +REDLIB_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY=off +# Disable the confirmation before visiting Reddit +REDLIB_DEFAULT_DISABLE_VISIT_REDDIT_CONFIRMATION=off +# Hide score by default +REDLIB_DEFAULT_HIDE_SCORE=off +# Enable fixed navbar by default +REDLIB_DEFAULT_FIXED_NAVBAR=on \ No newline at end of file diff --git a/conf/systemd.service b/conf/systemd.service index 7e1d6f4..8874621 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ After=network.service User=__APP__ Group=__APP__ DynamicUser=yes -EnvironmentFile=-__INSTALL_DIR__/libreddit.conf +EnvironmentFile=-__INSTALL_DIR__/.env ExecStart=__INSTALL_DIR__/libreddit -a 127.0.0.1 -p __PORT__ [Install] diff --git a/scripts/install b/scripts/install index d3cb5b9..062e90f 100755 --- a/scripts/install +++ b/scripts/install @@ -38,10 +38,10 @@ yunohost service add $app --description="Alternative to Reddit" --log="/var/log/ #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="libreddit.conf" --destination="$install_dir/libreddit.conf" +ynh_add_config --template=".env" --destination="$install_dir/.env" -chmod 400 "$install_dir/libreddit.conf" -chown $app:$app "$install_dir/libreddit.conf" +chmod 400 "$install_dir/.env" +chown $app:$app "$install_dir/.env" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 9ebb616..6f41245 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,7 +30,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" ynh_script_progression --message="Upgrading source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir" --keep="libreddit.conf" +ynh_setup_source --dest_dir="$install_dir" --keep=".env" chown -R $app:www-data "$install_dir" chmod +x $install_dir/libreddit @@ -53,10 +53,10 @@ yunohost service add $app --description="Alternative to Reddit" --log="/var/log/ #================================================= #ynh_script_progression --message="Updating a configuration file..." --weight=1 -# ynh_add_config --template="libreddit.conf" --destination="$install_dir/libreddit.conf" +# ynh_add_config --template=".env" --destination="$install_dir/.env" -# chmod 400 "$install_dir/libreddit.conf" -# chown $app:$app "$install_dir/libreddit.conf" +# chmod 400 "$install_dir/.env" +# chown $app:$app "$install_dir/.env" #================================================= # START SYSTEMD SERVICE